Releases: maslianok/react-resize-detector
Releases · maslianok/react-resize-detector
v9.0.0
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
What's Changed
- [233] Add null type fallback to targetRef by @snelsi in #234
- Chore/update dependencies by @snelsi in #235
- remove duplicate imports by @josiahsrc in #232
New Contributors
- @josiahsrc made their first contribution in #232
Full Changelog: v8.0.3...v8.0.4
v8.0.3
v8.0.2
v8.0.0
✅ 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 theuseEffect
hook - Cleanup examples, remove unused imports
- Add missing
prepublishOnly
script
Types
- Add missing TS types
- Fixed some problematic TS types
- Swap
any
withunknown
where possible - Add stricter template requirements for the
useResizeDetector
hook - Add export of
ResizeDetectorProps
anduseResizeDetectorProps
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 thetypes
folder - Remove the deprecated
withPolyfill.d.ts
file ComponentsProps
=>ResizeDetectorProps
patchResizeHandlerType
=>PatchedResizeObserverCallback
- If both
handleWidth
andhandleHeight
are turned off,ResizeObserver
andresizeCallback
won't be created
v7.0.0
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';