react_dom library
Exposes a typed version of react_dom.render and react_dom.unmountComponentAtNode
from the react package so that over_react consumers
do not have to declare a direct dependency on the react package in their pubspec.yaml.
This allows us to insulate our consumers from "breaking" internal changes in the react package.
It is strongly suggested that consumers namespace when importing this library to avoid collisions when creating custom
UiComponents.
import 'package:over_react/react_dom.dart' as react_dom;
import 'package:over_react/over_react.dart';
Functions
-
render(
ReactNode? element, Element mountNode) → dynamic -
Renders the provided
elementinto the DOM mounted in the providedmountNodeand returns a reference to it based on its type: -
unmountComponentAtNode(
Element mountNode) → bool -
Removes a React
Componentfrom the DOM that was mounted via render and cleans up its event handlers and state.