React Router DOM package is changing things like useHistory() in v5 to useNavigate() in v6. See here for more details.
The app currently uses the old useHistory() hook from the React Router package, but the app has v6 installed, so we'd like to update usages of the old function wherever possible.
We also want to replace <Redirect /> with <Navigate />.
This PR:
Replaces useHistory() usages with useNavigate(), the new function for v6 of the router package.
React Router DOM package is changing things like
useHistory()
in v5 touseNavigate()
in v6. See here for more details. The app currently uses the olduseHistory()
hook from the React Router package, but the app has v6 installed, so we'd like to update usages of the old function wherever possible. We also want to replace<Redirect />
with<Navigate />
.This PR:
useHistory()
usages withuseNavigate()
, the new function for v6 of the router package.<Redirect />
with<Navigate />
.Implements #678.