-
I'm trying to make a register form on different pages and I saw this guide. but it didn't work because I'm using a newer version of react-router-dom, than in the guide and some functions are deprecated in the newer version, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I am not following closely with react-router API change, which API is broken now? |
Beta Was this translation helpful? Give feedback.
-
@TOcvfan : I think the guide is just an idea about how to manage form values between different routes and pages, it was never a guide to integrate with "react-router-dom" library. In the guide, there is no mention a specific routing library meaning people who uses other routing library can take reference on it to make it work for themself. If you are working with React Router v5, then my recommendation is to stick with it, changing major version of 3rd party library can be a pitfall on current code base. Beside that, if you have no legacy code, then just go ahead with React Router v6. Working demo: https://codesandbox.io/s/react-hook-form-wizard-form-forked-ez3lzx |
Beta Was this translation helpful? Give feedback.
@TOcvfan : I think the guide is just an idea about how to manage form values between different routes and pages, it was never a guide to integrate with "react-router-dom" library. In the guide, there is no mention a specific routing library meaning people who uses other routing library can take reference on it to make it work for themself.
If you are working with React Router v5, then my recommendation is to stick with it, changing major version of 3rd party library can be a pitfall on current code base.
Beside that, if you have no legacy code, then just go ahead with React Router v6.
Working demo: https://codesandbox.io/s/react-hook-form-wizard-form-forked-ez3lzx