My current design is to have clients connect to my (Java) Web API Gateway using a browser, the Web API Gateway will call each (Java) microservice to get their JSON data and retu
So, a React component
needs two things: the JavaScript
source code and the data.
The JavaScript source code can be provided by a CDN.
The data must be provided by the Microservices.
If you don't want server side rendering, then the skeleton index.html file along with the JS
files are provided by a CDN.
If you need server side rendering (for SEO purposes, for example) then the API gateway (or another Web server) will render the components using NodeJS
by requesting their source code from the CDN and their data from the microservices then return the full HTML
to the browser.
On the client side, React
will continue to load other data from the right microservice as JSON
using the API gateway
.