Sub-components can be flexibly and conveniently mounted to components in other locations.
Examples
container1
container2
Basic
The button belongs to container1 in the tree structure of react, and belongs to container2 in the structure of dom, You can try to click the button and the event will be captured by container1.
Properties
| Property | Description | Type | Default | Require |
|---|---|---|---|---|
| container | Specify the parent node to mount, support strings, node instances or functions that return these | string | Element | (() => string | Element) | - | false |
| children | Child node | ReactNode | - | true |