feat(frontend): Migrate to react-router-dom v6 (WIP)
In short:
v6.3.0 is a pain in the butt, but v6.4.0 is even worse (!), because they are hiding the history object completely! That means you rely on abstractions and they handle everything internally within the library. Read more here if you are curious... or save yourself the headache and stay away (for now).
Changes
- Removed
HistorySetterin favour ofhistory.provider.tslike we do in the Cloud UI - Used
unstable_HistoryRouterto match Cloud UI - Used new hooks wherever possible
- Used history provider for non-functional components
- Fixed props problems for components (see below) where possible
- Removed
Switchin favour ofRoutes - Removed
exactprop (this is no longer needed in v6, but nested routes should haveroute/**wildcard)
WIP
<Route> component which accepts props needs to receive them either via query params with useQueryParams (only in hooks) or useRouteMatch (for any matching route, also only for functional components).
Did not fix any tests
See links: https://reactrouter.com/en/6.4.0/upgrading/v5 https://reactrouter.com/en/v6.3.0/getting-started/concepts
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
@malinskibeniamin Hey Ben, is this still WIP or can I close this PR?