joshwnj / joshwnj/react-visibility-sensor

Containment as a RefObject

Open
#171 2 comments 2 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.