I have a basic project in Laravel 7, and I'm also using React for the UI. and I want React to handle the routes with React-router-dom instead of making use of the routes from the Laravel project.
Laravel has its own routing system and react does too, but when I change the url to go to a particular route Laravel's routing system takes over and sends me to their 404 page. I know it's not a code error, it's a conflict that usually occurs between the backend who serves the files from the web to the browser. How can I modify my Laravel project configuration so that it allows me to handle routes with react-router-dom?
Example:
when I enter my home:
and when I enter another view in React:
The same thing happened to me, researching I found the solution, in case you couldn't find it or in case someone else has the same problem, the solution is to reconfigure our web routes, suddenly I don't explain myself very well but we should load the main view in case from any route. Example: It is the replacement for web routes - it should be pasted into web routes - layouts.app is where we have root depending on how you configured your react project