dimanche 26 mai 2019

A static web server is able to serve a certain route of single page web application, how?

I deployed a single page react app with client side routing on a static web server (to be specific: web server for chrome). The app uses "react-router-dom" for routing. When I click a nav-link, the browser is able to redirect to the new route. But when I write the URL in the URL-bar (or refresh the page), the server responds with an error i.e. "entry not found: /routeName". Similarly, the routing (by clicking nav-link) works even when server is not running. Why is that?




Aucun commentaire:

Enregistrer un commentaire