We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43ab993 commit 32fe67bCopy full SHA for 32fe67b
src/Step.js
@@ -2,7 +2,7 @@ import React from 'react';
2
import useIntersectionObserver from './useIntersectionObserver';
3
4
const useRootMargin = offset => {
5
- return `${offset * 100}% 0px -${100 - offset * 100}% 0px`;
+ return `-${offset * 100}% 0px -${100 - offset * 100}% 0px`;
6
}
7
8
const Step = props => {
@@ -56,7 +56,7 @@ const Step = props => {
56
document.removeEventListener('scroll', handleScroll);
57
};
58
59
- }, [entry, rootMargin]);
+ }, [entry]);
60
61
return React.cloneElement(React.Children.only(children), {
62
'data-react-scrollama-id': scrollamaId,
0 commit comments