沈昶

Forums

沈昶

7yr ago

Using Vue's <keep-alive> in React - Keep your React components alive

If you've used Vue, you know that it has a very good component (keep-alive) that keeps the state of the component to avoid repeated re-rendering.
But you want to have this effect in React is difficult, so I wrote this component to achieve this effect.