I read this article:
Basically, you have two separate apps running simultaneously on 2 different ports. Express is on port 9000, and react is on port 3000. You can ‘connect’ to express by fetching a URL route on the express app.
On the express app, you can have a number of different routes in which you can res.send things. You extract information from the ‘res’ object inside the react app.
I want to res.send react components, but that won’t work because 1) the express app is in a separate folder that doesn’t have react as a dependency and 2) Even if I could ‘res.send’ react components, or just plain jsx, how would I extract that from a ‘res’ object?
It seems that the setup described in the article does not allow you to create anything more than a single page react website. How would we build a multi-page react website, each page accessed via a different route? Can this be done using express?