geelen / react-snapshot

A zero-configuration static pre-renderer for React apps
MIT License
1.66k stars 104 forks source link

Confusing README #127

Closed aegatlin closed 2 years ago

aegatlin commented 5 years ago

As a person beginning investigation into the world of pre-rendering, I am still confused after reading the README about what this project does and how it works.

As I understand the world of prerendering, it's a backend problem. I need "string" HTMLs to serve up from the backend that then eventually get "hydrated" by the frontend.

This tool seems to be a frontend library. How do you know enough about the arbitrary of the tool-user to know how to supply the backend with the appropriate HTML strings?

You mentioned using ReactDOMServer in the README, is this a backend, Node.js library?

I would like further clarity on these questions, and perhaps other new users that are also new to the space of prerendering would benefit from clarity in these regards.

It seems like a really cool tool. Thank you for creating, maintaining, and sharing it! :D

rohan-deshpande commented 5 years ago

You render React in node to generate static HTML, that's it really, it's how all React server side rendering works.

For this repo, you don't need a "server" it's all done for you. It takes your built app as input and outputs static HTML.