Releases: dotcore64/react-stay-scrolled
Releases · dotcore64/react-stay-scrolled
v9.0.0
v8.0.1
fix build badge
v8.0.0
- Drop CJS and UMD builds (ESM only)
- Drop IE support
- Require Node.js >= 14
- Add React 18 support
v7.4.0
Make this module esm-first and hybrid commonjs
v7.3.1
Fix typescript options definition
v7.3.0
- Add typescript typings
v7.2.0
- Support react@17
- Upgrade all dependencies
v7.0.0
runScroll
no longer acceptsdom
as a first argument. If needed, use theref.current
from the component instead.- Add tests and examples of usage with react-spring
v6.0.0
Replaces onScrolled
with a new function returned by the hook, isScrolled
. Whereas before you'd do:
useStayScrolled(ref, { onScrolled: () => console.log('Scrolled down') });
Now you do:
const ref = useRef();
const { isScrolled } = useStayScrolled(ref);
const onScroll = () => {
if(isScrolled()) {
console.log('Scrolled down');
}
};
return <div ref={ref} onScroll={onScroll} />;
v5.0.0
Removes redundant onStayScrolled
option. stayScrolled
now returns true
when it scrolls, false
otherwise.