this.node,
this.handleIntersection
);
+
+ this.componentMounted = true;
}
componentWillUnmount () {
}
this.props.intersectionObserverWrapper.unobserve(this.props.id, this.node);
+
+ this.componentMounted = false;
}
handleIntersection = (entry) => {
}
hideIfNotIntersecting = () => {
+ if (!this.componentMounted) {
+ return;
+ }
+
// When the browser gets a chance, test if we're still not intersecting,
// and if so, set our isHidden to true to trigger an unrender. The point of
// this is to save DOM nodes and avoid using up too much memory.