frintjs / frint

Modular JavaScript framework for building scalable and reactive applications
https://frint.js.org/
MIT License
756 stars 37 forks source link

frint-react: support hydration from server-rendered HTML #335

Closed fahad19 closed 6 years ago

fahad19 commented 6 years ago

Currently

We can only render in the browser targeting a specific node.

Scenario for improvement

When HTML is rendered from the server, we don't really need to render everything again in the browser, since React can pick up from where the server rendering ended.

This can be achieved with ReactDOM.hydrate: https://reactjs.org/docs/react-dom.html#hydrate

Adding a new function in frint-react for hydrate would help achieve a nice solution for server-to-client flow.