joshwnj / joshwnj/react-visibility-sensor
Containment as a RefObject
Open
- Dominant language
- JavaScript
- Stars
- 2.3k
- Forks
- 192
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
It would be more React-way to use RefObject as approach to get DOM element.
RefObject example
```
const containmentRef = useRef(null); // it will be available after mounting
// it becomes
// { current: null } -> { current: HTMLElement }
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.