Answer the question
In order to leave comments, you need to log in
Issue with react-router, "Not Found" on page refresh?
The strange behavior of react-router-dom v4, in general, with webpack-dev-server's property historyApiFallback: true
when updating the page on some module, correctly updates the page and displays the desired module.
But when creating a bundle for production, a problem arises, react-router displays the following message if you update the page on some module, for example /contact: Not Found
But if you update on the main one, then everything works fine.
What is it connected with? I looked in the documentation for react-router-dom, there is a property there forceRefresh
, by setting it to true it only reloads the page and doesn't solve the problem.
The configuration can be viewed at the link: webpack-app
Answer the question
In order to leave comments, you need to log in
Everything is much simpler, you need to enable mod_rewrite ))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question