Skip to content

Releases: maslianok/react-resize-detector

v9.0.0

08 Apr 18:17
Compare
Choose a tag to compare

This version introduces a new logic for the useResizeDetector hook.
The hook now stores the ref in the internal state, allowing us to handle ref changes.

There should be no breaking changes.
Now it's safe to delete refreshMode="debounce" refreshRate={0} props that many of you used as a workaround.

v8.0.4

18 Feb 13:49
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v8.0.3...v8.0.4

v8.0.3

20 Jan 19:50
Compare
Choose a tag to compare

Remove console.log 🤷‍♂️

v8.0.2

19 Jan 12:24
Compare
Choose a tag to compare

Fixed sourcemaps #230

v8.0.0

17 Jan 21:03
Compare
Choose a tag to compare

#227 by @snelsi

✅ ChangeLog:

Dependencies

  • Update all dev dependencies to the latest version
  • Remove unused/redundant dependencies
  • Regenerate yarn.lock

Docs

  • Update License copyright year to 2023
  • Fix License copyright name

Refactor

  • Minor code cleanup
  • Remove redundant isSSR check inside the useEffect hook
  • Cleanup examples, remove unused imports
  • Add missing prepublishOnly script

Types

  • Add missing TS types
  • Fixed some problematic TS types
  • Swap any with unknown where possible
  • Add stricter template requirements for the useResizeDetector hook
  • Add export of ResizeDetectorProps and useResizeDetectorProps types in the root

Eslint + Prettier

  • Add proper Eslint + Prettier setup
  • Remove redundant .vscode prettier config
  • Remove redundant formatting rules inside .eslintrc
  • Add formatting and linting related scripts to package.json:
    • prettier - run Prettier formatting on all files,
    • lint - run Eslint linting on all files,
    • lint-fix - run Eslint linting on all files and fix all auto-fixable problems,
    • fix - run both Prettier + Eslint
  • Run prettier + eslint fix for all files, fix eslint errors and warnings

Rollup v3

  • Update to Rollup v3
  • Update plugins config:
    • rollup-plugin-typescript2 => @rollup/plugin-typescript
    • rollup-plugin-node-externals added

⚠️ Breaking Changes:

  • Generated TS types inside the build folder moved to the types folder
  • Remove the deprecated withPolyfill.d.ts file
  • ComponentsProps => ResizeDetectorProps
  • patchResizeHandlerType => PatchedResizeObserverCallback
  • If both handleWidth and handleHeight are turned off, ResizeObserver and resizeCallback won't be created

v7.0.0

05 Jan 18:02
Compare
Choose a tag to compare

v7.0.0 BREAKING CHANGE

resize-observer-polyfill is removed from the library:

  • all modern browsers support ResizeObserver API natively
  • resize-observer-polyfill repository is abandoned

It means that starting from v7 you won't be able to use the build with polyfill:

// WRONG: there is no such file starting from v7
import ResizeObserver from 'react-resize-detector/build/withPolyfill';

// CORRECT
import ResizeObserver from 'react-resize-detector';

v6.7.6

11 Aug 14:58
Compare
Choose a tag to compare
  • improve TS typings #177

v6.7.5

11 Aug 07:17
Compare
Choose a tag to compare

Upgrade libraries

v6.7.4

03 Jul 08:55
Compare
Choose a tag to compare

Fix TS issue #165

v6.7.3

23 Jun 17:45
ed79001
Compare
Choose a tag to compare

Merge TS improvements: #161

Upgrade libraries