All Downloads are FREE. Search and download functionalities are using the official Maven repository.

japgolly.scalajs.react.ReactRoot.scala Maven / Gradle / Ivy

There is a newer version: 3.0.0-beta9
Show newest version
package japgolly.scalajs.react

/** A location in the DOM into which React has initialised itself, and now manages.
  *
  * Can be used to render a React element into the DOM with `.render`.
  *
  * @since v2.2.0 / React 18
  */
@inline final case class ReactRoot(raw: facade.RootType) {

  @inline def render[A](node: A)(implicit r: Renderable[A]): Unit =
    raw.render(r(node))

  @inline def unmount(): Unit =
    raw.unmount()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy