You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce a breaking change due to the fact that React 16 internals don't work the exact same way than before. For that reason, we now expose "mapDomNodeToProps" property that takes the target node as input and binds the output object properties to the transported component's properties.
One advantage of using the `view` prop to specify a component is that any `data-` attributes from the DOM node the portal is rendering to will be passed along to our component as a `data` prop.
96
-
For example, if the DOM node we are rendering to looks like this:
100
+
One advantage of using the `view` prop is the ability to derive properties from the original DOM node and pass them to the the component.
101
+
102
+
Let's say our original DOM element already contains some useful data:
Context from your main tree is passed down automatically to your `ElementPortal`. For example, if you use Redux, the `store` context will not get lost, and using `connect` will behave as expected in the children of your `ElementPortal`.
0 commit comments