Ok, so I\'ve made a SPA using React and React-Router and have pushed it to github pages, but none of the routes I have written work when I refresh or click back in my browse
To extend Jildert's answer, I did the same - copied index.html to 404.html before deploying to the github pages and it worked.
So I've just updated pre-deploy section of package.json to include this copy action and now it works fine with BrowserRouter:
"predeploy": "npm run build && cp build/index.html build/404.html",
"deploy": "gh-pages -d build"