Releases: thebuilder/react-intersection-observer
v8.25.1
- fix: move tiny-invariant to dependencies a6c965e
Build optimizations
- build: optimize the rollup build 3cadc06
v8.24.2
- fix: don't add onChange prop to the plain children container (#272) 4d88ea2
- Fix recipe for triggering animations (#271) 31a890b
- chore(package): update babel-eslint to version 10.0.3 (#268) 4af02e7
- chore: upgrade dependencies b20abcc
- chore(package): update @typescript-eslint/eslint-plugin to version 2.0.0 (#261) a5061a5
- Changed typo const supportsNativeLoading to supportsLazyLoading (#265) fdc4e63
- Add codesandbox example 3fe0710
- Merge remote-tracking branch 'origin/master' e037bdc
- docs: update the recipes c6d1f48
v8.24.1
- chore: upgrade dependencies 4734187
- refactor: switch to useCallback for setting node ref b31487b
- build(deps): bump lodash-es from 4.17.11 to 4.17.14 (#253) 828cfa9
- Add note about constant threshold array (#251) 2f65d87
- chore: upgrade dependencies 7961292
- Update eslint-plugin-import to the latest version 🚀 (#245) 8a77732
- Update eslint to the latest version 🚀 (#244) f5fe897
- Update babel-eslint to the latest version 🚀 (#242) 7319667
- Minor JS typos in hook recipes (#243) b473795
- Minor JS typos in hook recipes (#243) f71d5c0
- Update babel-eslint to the latest version 🚀 (#242) c627551
- Minor JS typos in hook recipes (#243) 5f40a96
- Minor JS typos in hook recipes (#243) d06da8c
- readme: fix typo 0ca244a
- build: remove np from devDependencies 6fa9cc1
- build: add an improved release script 5806034
- refactor: make types for Observer readonly cb7e9f6
- build: upgrade the build command daf6805
- chore: upgrade dependencies, including switching to the @testing-library/react namespace and TypeScript 3.51 e268f18
- Update Recipes.md 3029aa8
- docs: fix typos c91f718
- Update Recipes.md e1fdeff
- Merge remote-tracking branch 'origin/master' 197ccce
- docs: update the documentation, fixing typos and add recipes fe6d30f
- chore(package): update rollup-plugin-terser to version 5.0.0 (#230) 755e92e
- Update eslint-plugin-import to the latest version 🚀 (#234) 5ec08c5
- Update rollup-plugin-commonjs to the latest version 🚀 (#227) e71f220
- Update intersection-observer to the latest version 🚀 (#226) 6593532
- Update package.json 9b743f9
- don't use yarn for np. Might not work correctly with contents 0a1b726
- Update package.json 1a3f5d7
Restructure package contents
This release restructures how the project is published to npm
. Instead of publishing the entire project, it just publishes the content of the dist
directory.
This is only a breaking change, if you were importing files from the src
or dist
directory before.
If you do run into an issue with imports, it should be fixed by importing directly from react-intersection-observer
.
TypeScript Tweaks
This release tweaks the Typescript typings for the PlainChildren
version, so it should be more generic.
v8.22.3
v8.22.2
Hooks were broken in last release - they would never trigger when they left the viewport. 😳
Output test-utils.js to CommonJS
This fixes #197 and allows you to actually import the file into Jest.
Rework some internals
Potential breaking change #195
Change for the <InView>
Previously, the initial callback would trigger a state
update, even if the element was still outside the viewport.
This update changes the behavior, so it won't trigger new state update before the element enters the viewport.
If you used the IntersectionObserverEntry
during that first callback, it will no longer work. The use case for this, is most likely to determine if the element started outside the viewport.
Workaround
As a workaround, you can use the onChange
callback, since this will still be called everytime.