#
React
#
404 page using react-router when refresh on routes
Faced this issue using react-create-app
with react-router
and deploying it to Github Pages.
#
Solution
Added the 404.html file and script tag in index.html as instructed here: https://github.com/rafgraph/spa-github-pages
Credit: https://create-react-app.dev/docs/deployment/#notes-on-client-side-routing