Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

History and match replacement in v6 react-router-dom #10

Open
adamsheeraz4 opened this issue Oct 22, 2023 · 0 comments
Open

History and match replacement in v6 react-router-dom #10

adamsheeraz4 opened this issue Oct 22, 2023 · 0 comments

Comments

@adamsheeraz4
Copy link

get rid of arguments in Notepage().

then get noteId via: let noteId = useParams().id;

history is replaced by useNaviagte. So use let navigate = useNavigate();

Change history.push('') to navigate ('').

Don't forget to import these two from react-router-dom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant