fkhadra / fkhadra/react-on-screen
Pass `DOMRect` to child render function as a second argument
Open
- Dominant language
- JavaScript
- Stars
- 402
- Forks
- 50
- PR merge metrics
- No merged PRs in 30d
Description
The use case is the need to know which side of the screen the component is going off of. If `TrackVisibility` is already keeping track of a ref and rect, can one or both of these be passed back to the child render function along with `isVisible`?
These are pretty versatile bits of information, I'm sure there are other use cases too.
Additionally, the data might need to be passed to any relevant callbacks like `onVisible` (#39).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.