How are Express and React used together in an application?

Viewed 38

I am learning Express with this book and now I arrived at the React chapter. The author showed a cool little application which is very interesting, but it is completely independent of the Express application I built by following all the other 14 chapters.

I am having trouble understanding (from an architecture perspective) how can Express and React work together...

I thought of creating APIs with Express and having React request the necessary data from them. Is it a common approach? Are there other ideas?

Thank you!

1 Answers

As React applications are SPA, the common way is of course to have an api with your Express (or any other backend), and then use React to retrieve data from it and display.

Related