How to fix the "useNavigate() may be used only in the context of a <Router> component" error in React
I recently came across this error while trying to do programmatic navigation in React and wanted to write this down for my future self, in case I run into this again.
Usually, you will want to use the useNavigate() hook instead of useHistory in the l...
codechunks.hashnode.dev1 min read