Skip to content

Commit

Permalink
docs: add note about iframes
Browse files Browse the repository at this point in the history
  • Loading branch information
Thinkscape authored Oct 14, 2024
1 parent e611efe commit 79d11c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ It extra props to the InPortal (using the extra functionality we've attached to
* Reverse portals tie rebuilding of the contents of the portal to InPortal (where it's defined), rather than the parent of the OutPortal (where it appears in the tree). That's great (that's the whole point really), but the contents of the InPortal will still be rebuilt anytime the InPortal itself is, e.g. if the InPortal's parent is rebuilt.
* Be aware that if you call `create*PortalNode` in the render method of the parent of an InPortal, you'll get a different node to render into each time, and this will cause unnecessary rerenders, one every time the parent updates. It's generally better to create the node once and persist it, either using the useMemo hook, or in the initial construction of your class component.
* By default, the types for nodes, InPortals and OutPortals allow any props and any components. Pass a component type to them to be more explicit and enforce prop types, e.g. `createHtmlPortalNode<MyComponent>`, `<portals.InPortal<MyComponent>>`, `<portals.OutPortal<MyComponent>>`.
* iFrames currently don't work as expected and [will always reload when moved around the DOM](https://github.com/whatwg/html/issues/5484). There are no known workarounds but the issue is being investigated as part of https://github.com/whatwg/dom/issues/891

## Contributing

Expand Down Expand Up @@ -184,4 +185,4 @@ To actually make your changes, you just need to set up the codebase:

## Security contact information

To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.

0 comments on commit 79d11c4

Please sign in to comment.