We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 34fb96f + 5da81d2 commit 9699c31Copy full SHA for 9699c31
1 file changed
src/InView.tsx
@@ -74,6 +74,11 @@ export class InView extends React.Component<
74
};
75
}
76
77
+ componentDidMount() {
78
+ this.unobserve();
79
+ this.observeNode();
80
+ }
81
+
82
componentDidUpdate(prevProps: IntersectionObserverProps) {
83
// If a IntersectionObserver option changed, reinit the observer
84
if (
@@ -91,7 +96,6 @@ export class InView extends React.Component<
91
96
92
97
componentWillUnmount() {
93
98
this.unobserve();
94
- this.node = null;
95
99
100
101
node: Element | null = null;
0 commit comments