render function
Renders the provided element
into the DOM mounted in the provided mountNode
and returns a reference to it based on its type:
- Returns an Element if
element
is a DOM component (e.g. Dom.div). - Returns a React
Component
ifelement
is a composite component.
Throws if
element
ormountNode
arenull
.
If the element
was previously rendered into the mountNode
, this will perform an update on it and only
mutate the DOM as necessary to reflect the latest React component.
Use unmountComponentAtNode to unmount the instance.
Proxies
react_dom.render
.
Implementation
dynamic render(ReactNode element, Element mountNode) {
return react_dom.render(element, mountNode);
}