react-before-leave
React component and hook which listens to `beforeunload` on the window when mounted.
react-component-state-cache
A simple caching mechanism so that React components can remember their state when they are mounted, unmounted, and re-mounted