We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4abeb0 commit 12d6c86Copy full SHA for 12d6c86
src/ScrollReveal/index.tsx
@@ -69,6 +69,12 @@ export class ScrollReveal extends React.Component<ScrollRevealProps> {
69
this.context.theme.scrollReveals.push(this as any);
70
}
71
72
+ componentDidUpdate() {
73
+ if (!this.context.theme.scrollReveals.includes(this as any)) {
74
+ this.context.theme.scrollReveals.push(this as any);
75
+ }
76
77
+
78
componentWillUnmount() {
79
const { scrollReveals } = this.context.theme;
80
scrollReveals.splice(scrollReveals.indexOf(this as any), 1);
0 commit comments