hydrateRoot
Check out the official React docs!
For more detailed information about React concepts and APIs, please refer to the official documentation for hydrateRoot.
ReactDOM.hydrateRoot
is used to hydrate server-rendered HTML with React, attaching event handlers and making the UI interactive. This is essential for server-side rendering (SSR) setups.
module Example.HydrateRoot
open Feliz
open Fable.Core.JsInterop
// This example assumes you have server-rendered HTML with id "root" in your HTML
ReactDOM.hydrateRoot(
Browser.Dom.document.getElementById("root"),
Example.UseId.UseId()
)