createRoot
Check out the official React docs!
For more detailed information about React concepts and APIs, please refer to the official documentation for createRoot.
ReactDOM.createRoot
is used to initialize a React root and render your application into a DOM element. This is the recommended way to start a React app in modern React.
module Example.CreateRoot
open Feliz
open Fable.Core.JsInterop
[<ReactComponent>]
let private App () =
Html.h1 "Hello, Feliz!"
let private root = ReactDOM.createRoot (Browser.Dom.document.getElementById "root")
root.render (App())