Reuse existing rendered component in react-router 4

Viewed 370

We have an expensive to render component that we use as a route in react-router 4.

When navigating away from it and then returning to it, it is recreated and rendered. I would like to cache/hide-unhide it instead of recreating it (avoid mount/unmount).

Is there built in support for this in react-router?

Note we use the new react-router-dom.

Thanks

0 Answers
Related