I created a react app (also use react-router) without server and I build it. After I upload it to the hosting it works fine until I tried to write the url to the address bar, it display "Not Found The requested URL /AboutMe was not found on this server."
Do I need also to create a server to catch the url (/AboutMe) everytime I try to write it to the address bar?
<Router history={history}>
<React.Fragment>
<Switch>
<Route exact path = "/" render = {() => (<Home value = {info} />)} />
<Route exact path = "/AboutMe" render = {() => (<AboutMe value = {info} />)}/>
<Route component = {NotFound} />
</Switch>
</React.Fragment>
Aucun commentaire:
Enregistrer un commentaire