Custom 404 Error Page in React App with HashRouting and Spring Boot

Are you challenged with showing a custom 404 error page built in React when your app routing is handled using HashRouter instead of BrowserRouter and you are using spring boot to deploy your app as static SPA?

Then, you are on the right blog looking for the right solution.

First Thought: Why not just use BrowserRouter then?