(prevProps: IntersectionObserverProps)
| 85 | } |
| 86 | |
| 87 | componentDidUpdate(prevProps: IntersectionObserverProps) { |
| 88 | // If a IntersectionObserver option changed, reinit the observer |
| 89 | if ( |
| 90 | prevProps.rootMargin !== this.props.rootMargin || |
| 91 | prevProps.root !== this.props.root || |
| 92 | prevProps.threshold !== this.props.threshold || |
| 93 | prevProps.skip !== this.props.skip || |
| 94 | prevProps.trackVisibility !== this.props.trackVisibility || |
| 95 | prevProps.delay !== this.props.delay |
| 96 | ) { |
| 97 | this.unobserve(); |
| 98 | this.observeNode(); |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | componentWillUnmount() { |
| 103 | this.unobserve(); |
nothing calls this directly
no test coverage detected