I have a React
Front-end connected to Wordpress API
and the routes are defined in clientside with React Router
. When i use Link
to direct them to dynamic routes they work fine. But when i use browser address bar directly to access the links pressing enter, or i refresh.i get
404 page not found
and i got to know that is because a direct call to server is happening and the there's no javascript
to manipulate the react-router
actions on the shared host when we have a PHP Server
on that.
Thought about react-snapshot
but its not going to suit the dynamic nature from the API.Please can anyone i give a possible way to go around this issue?