I have my routes defined as follows:
<Route component={App}>
<IndexRoute component={Main}/>
<Route path="/foo" component={Foo}/>
<Route path="/bar" component={Bar}/>
</Route>
By default, the component is unmounted when moving from Footo Bar. Since I have complex code in the component Foo(Google Maps with custom animations), I would like to prevent unmounting and hiding this component, so when the user returns, it will load instantly.
How to do it?
source
share