Isomorphic Web Applications: Universal Development with React by Elyse Kolker Gordon

Isomorphic Web Applications: Universal Development with React by Elyse Kolker Gordon

Author:Elyse Kolker Gordon [Elyse Kolker Gordon]
Language: eng
Format: epub
Publisher: Manning Publications
Published: 2018-07-01T21:00:00+00:00


Figure 7.9. The middleware allows routing on the server to respond correctly based on the React Router shared routes.

Note

If you’re using React Router 4, check out appendix B for an overview of how to handle the routes on the server.

To get the middleware hooked up to the /* (all) route handler you set up in the previous section, you’ll replace the request handler function with the renderView middleware function. The following listing shows the basic route-matching logic of the middleware.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.