Re:Build Your Own React
by allover on Tuesday November 26, 2019 @03:59PM
(#21642627)
Then you can use `useHistory` (or `withRouter` if you're not hooks-ready).
I somewhat agree that the <Redirect /> component is not actually that useful, it's only useful in very simple cases like "based on one route plus conditional redirect to another", e.g.:
I somewhat agree that the <Redirect /> component is not actually that useful, it's only useful in very simple cases like "based on one route plus conditional redirect to another", e.g.: