You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There should be a way to do that in React, I'm confident in that. But it most def won't be available as something included in wouter, as it is against its core philosophy: to the keep the code as minimal as possible.
Remember, Routes are just components that conditionally render or don't render its content. That's it. I would suggest to figure out the scroll restore first using plain components without routes. It should be easy to connect it to the router afterwards.
Regarding caching, I'm not fully sure how you're planning to cache a component in React. At least, I haven't met applications where it is done, perphaps because React is fast enough to handle re-renders. I guess, it's better to invest in optimizations such as https://reactjs.org/docs/react-api.html#reactmemo