practical examle of using inview with mapped elements #586
-
It is quite clear how to use inview to track the position of an element on the screen when scrolling. But what if there is more than one such element? refN is not convenient. What if these elements are generated using map? what is called
|
Beta Was this translation helpful? Give feedback.
Answered by
mcgrealife
Oct 7, 2022
Replies: 1 comment 3 replies
-
@uyriq here is an example #460 Basically create a Wrapper component that manages its own hook, and return the Wrapper in the map function Edited based on @thebuilder reply:
|
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
thebuilder
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@uyriq here is an example #460
Basically create a Wrapper component that manages its own hook, and return the Wrapper in the map function
Edited based on @thebuilder reply: