Navigation in React-Router v6

Hey Mosh,

in your course I’ve learned to Redirect after submitting a form with this.props.history.push("/movies");

It appears not to work in router v6, where it’s recommended to use the UseNavigation Hook. But in the course we are building a movieForm as a class component in which Hooks do not work like in functional components.

Do you have any suggestions how to use hooks in classes, or how to refactor classes to functional components which should be used in v6 over class components?

Thanks for your help