React-router urls don't work when refreshing or writing manually or pasting- solved - React

alidhuniya profile image Ali Hussain Dhuniya ・1 min read

In this video, I will show you how I solved this problem which I recorded when I found the solution

The short answer is: use Hashrouter.

live app: https://devswag.netlify.app/
stackoverflow: https://stackoverflow.com/questions/27928372/react-router-urls-dont-work-when-refreshing-or-writing-manually
official docs: https://reactrouter.com/web/api/HashRouter
github code: https://github.com/Alidhuniya/devT-shirt-React-with-Contentful


Editor guide