joshwnj / joshwnj/react-visibility-sensor
this.props.containment.getBoundingClientRect is not a function when using containment props
Open
- Dominant language
- JavaScript
- Stars
- 2.3k
- Forks
- 192
- PR merge metrics
- No merged PRs in 30d
Description
I'm not sure if this is a bug or a wrong usage issue.
Task: call `view` method if div is in the viewport.
My implementation:
```
render() {
const onChange = function (isVisible) {
return isVisible ? this.view : null;
};
return (
)
}
```
I get `this.props.containment.getBoundingClientRect is not a function` in the console. What am I doing wrong?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.