Jimmy Jia
Jimmy Jia
RRv4 re-renders the page on a redirect, right? so it will try to scroll the page. also render a blank page (ish) and mess up any saved scroll position
The issue I'm thinking of is that, if you click on a link that redirects you, the scroll update will fire twice – once on the page that renders the...
I'd be okay with merging the RRv4 bits, assuming the outstanding issues are resolved.
If it's working for everyone, we can merge it, I guess. I'd rather the issues here be addressed, but probably if it works in practice, the theoretical issues are not...
For the time being, why not just use @ytase's [`react-router-scroll-4`](https://www.npmjs.com/package/react-router-scroll-4)? I can't guarantee correctness, but it's probably closer to what you want.
Drat, I knew I forgot something! This is mostly right. A few caveats: - You should just use `createMemoryHistory` from React Router, instead of both the history version and `useRouterHistory`...
Right, so either you create one per request or `match` will. Either way you get a new `history` per request. You might be able to reuse a `history` across requests...
It's _probably_ okay but I'm not 100% sure, and we don't document the pattern anyway. But either way that's orthogonal, right? If you're just using `match({ location, routes })` and...
Interesting. Your redirects above should be written as `/widget-1` if you want them to be paths. If you want to use redirects to names, you'll need to directly call `replace`...
It's not redirects per se – just the `` component.