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.
2 parents 34e4e6b + 8e147a3 commit 68c3a12Copy full SHA for 68c3a12
src/index.tsx
@@ -21,13 +21,18 @@ const event = "hydrate";
21
22
const io =
23
isBrowser && IntersectionObserver
24
- ? new IntersectionObserver(entries => {
25
- entries.forEach(entry => {
26
- if (entry.isIntersecting || entry.intersectionRatio > 0) {
27
- entry.target.dispatchEvent(new CustomEvent(event));
28
- }
29
- });
30
- })
+ ? new IntersectionObserver(
+ entries => {
+ entries.forEach(entry => {
+ if (entry.isIntersecting || entry.intersectionRatio > 0) {
+ entry.target.dispatchEvent(new CustomEvent(event));
+ }
+ });
31
+ },
32
+ {
33
+ rootMargin: "150px"
34
35
+ )
36
: null;
37
38
// React currently throws a warning when using useLayoutEffect on the server.
0 commit comments