我想了解这段代码: react-router 如何使用同构应用程序(服务器端和客户端路由) . 客户端的react-router如何向服务器上的中间件发送请求?
react-router
链接到react-router
客户端的react-router如何向中间件发送请求
It doesn't send requests to server.
React路由器负责(来自docs):
React Router使您的UI与URL保持同步
请检查https://github.com/rackt/react-router/blob/latest/docs/Introduction.md和第一部分 Without React Router . 它显示了什么react-router替换 .
Without React Router
react-router更改浏览器URL . 但是这不会调用服务器 . 要与服务器通信,您可以使用jquery(http://api.jquery.com/jquery.ajax/)或superagent(https://github.com/visionmedia/superagent) .
1 回答
It doesn't send requests to server.
React路由器负责(来自docs):
请检查https://github.com/rackt/react-router/blob/latest/docs/Introduction.md和第一部分
Without React Router
. 它显示了什么react-router替换 .react-router更改浏览器URL . 但是这不会调用服务器 . 要与服务器通信,您可以使用jquery(http://api.jquery.com/jquery.ajax/)或superagent(https://github.com/visionmedia/superagent) .