Adam
Adam

Reputation: 3518

React server side rendering, generate html on dev environment

All examples of server side rendering are showing how to generate static content using express. When client enters the page the static content is getting generated and returned using node.

I'd like to be fully static with this and use say webpack to generate html on build command. The html would load js anyway, but if there is no js support, it would still show static content. This way I can host my server site rendered page on say Github pages.

How can I achieve this please?

Upvotes: 0

Views: 75

Answers (1)

tremby
tremby

Reputation: 10079

One option would be to use a framework built specifically for this, such as Gatsby.

Upvotes: 1

Related Questions