Skip to content

Commit 06c4d1b

Browse files
committed
Fix example: use the child ref
1 parent 3a7a161 commit 06c4d1b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

examples/cra/src/onlyChildWithNullViewport.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export default function OnlyChildWithNullViewport() {
2424
[visible]: isInViewport
2525
})}
2626
data-testid="box"
27+
ref={childElToWatch}
2728
>
2829
<p>{isInViewport ? 'In viewport' : 'Out of viewport'}</p>
2930
</div>

0 commit comments

Comments
 (0)