History and match replacement in v6 react-router-dom
Opened this issue · 0 comments
adamsheeraz4 commented
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