When a user tries to go to a route that is accessible through the react application router directly in the browser, the route is handled by express and express does not forward unfound endpoint requests to the react app.
When a 404 error is triggered on the API, the api should serve the react app at the requested endpoint. If the endpoint is still not found by react, the react app can take care of displaying a 404 not found page.
When a user tries to go to a route that is accessible through the react application router directly in the browser, the route is handled by express and express does not forward unfound endpoint requests to the react app.
When a 404 error is triggered on the API, the api should serve the react app at the requested endpoint. If the endpoint is still not found by react, the react app can take care of displaying a 404 not found page.
Pictures:
Accessed through the react router:
Accessed through the url: