File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 11import React , { Component } from 'react' ;
2- // import PropTypes from 'prop-types';
32import { ParallaxProvider } from 'react-scroll-parallax' ;
43import { ParallaxTest } from 'components' ;
54
65export default class App extends Component {
6+ // this just serves to test unmount/re-mount ParallaxProvider
7+ state = {
8+ mount : true ,
9+ } ;
10+
711 render ( ) {
812 return (
9- < ParallaxProvider >
10- < ParallaxTest />
11- </ ParallaxProvider >
13+ < main >
14+ { this . state . mount ? (
15+ < ParallaxProvider >
16+ < ParallaxTest />
17+ </ ParallaxProvider >
18+ ) : (
19+ < div />
20+ ) }
21+ </ main >
1222 ) ;
1323 }
1424}
Original file line number Diff line number Diff line change @@ -389,6 +389,7 @@ function ParallaxController() {
389389 this . destroy = function ( ) {
390390 _removeListeners ( ) ;
391391 _removeParallaxStyles ( ) ;
392+ window . ParallaxController = null ;
392393 } ;
393394}
394395
You can’t perform that action at this time.
0 commit comments