In Express JS you can use template engines to render views. You can also replace your views with React JSX components and render them to static HTML for each page request.

Install react-dom

In an existing Express project install and :

Next setup tsconfig.json

Configure typescript to process jsx in your file:

Create a view

Create a file and export a JSX element:

Render the view on page request

Inside a express route callback handler render the view to a buffer and send:

Now call this with a JSX component in your route: