I want to understand this code : How does react-router
work with an isomorphic app, (server and client side routing). How react-router on client side can send request to middleware on the server ?
Link to react-router
I want to understand this code : How does react-router
work with an isomorphic app, (server and client side routing). How react-router on client side can send request to middleware on the server ?
Link to react-router
How react-router on client side can send request to middleware
It doesn't send requests to server.
React router is responsible (From docs):
React Router keeps your UI in sync with the URL
Please check this https://github.com/rackt/react-router/blob/latest/docs/Introduction.md and first section Without React Router
. It shows what react-router replace.
react-router changes browser url. But this doesn't make calls to server. For communicate with server you can use jquery (http://api.jquery.com/jquery.ajax/) or superagent (https://github.com/visionmedia/superagent).