File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
core/src/main/scala/japgolly/scalajs/react Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 11package japgolly .scalajs .react
22
33import japgolly .scalajs .react .internal .NotAllowed
4+ import japgolly .scalajs .react .vdom .VdomElement
45import japgolly .scalajs .react .{raw => Raw }
56import org .scalajs .dom
67import scala .scalajs .js .|
@@ -12,6 +13,11 @@ object ReactDOM {
1213 def findDOMNode (componentOrElement : dom.Element | Raw .React .ComponentUntyped ): Option [ComponentDom .Mounted ] =
1314 ComponentDom .findDOMNode(componentOrElement).mounted
1415
16+ def hydrate (element : VdomElement ,
17+ container : Raw .ReactDOM .Container ,
18+ callback : Callback = Callback .empty): Raw .React .ComponentUntyped =
19+ Raw .ReactDOM .hydrate(element.rawElement, container, callback.toJsFn)
20+
1521 def unmountComponentAtNode (container : dom.Node ): Boolean =
1622 raw.unmountComponentAtNode(container)
1723
Original file line number Diff line number Diff line change @@ -84,5 +84,4 @@ find . -type f -name '*.scala' -exec perl -pi -e '
8484
8585# TODO
8686
87- * SSR stuff
8887* Rename ` .runNow() ` to ` .unsafeRunNow() ` ?
You can’t perform that action at this time.
0 commit comments