Draft: [client] React router: migration to v6
Migration to react-router v6:
-
Step 1: replace all Redirect in Switch's root level with Route (also see See https://github.com/remix-run/react-router/issues/6202) -
Step 2: https://reactrouter.com/docs/en/v6/upgrading/v5#upgrade-all-switch-elements-to-routes and make sure every relative & absolute links work -
Step 3: use useNavigation
instead ofuseHistory
-
Update active class: https://reactrouter.com/docs/en/v6/upgrading/v5#remove-activeclassname-and-activestyle-props-from-navlink-
Edited by Nicolas Frandeboeuf