Skip to content

Commit c5916b1

Browse files
committed
Update README
1 parent 7335b7d commit c5916b1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ const portalNode = portals.createHtmlPortalNode({
125125
});
126126
```
127127

128-
The div's DOM node is also available at `.element`, so you can mutate that directly with the standard DOM APIs if preferred.
128+
### `portals.createHtmlInlinePortalNode([options])`
129+
130+
Same as `portal.createHtmlPortalNode`, except it uses `<span>` instead of `<div>`. This can be helpful to avoid invalid HTML when portalling videos, etc into [phrasing content](https://developer.mozilla.org/en-US/docs/Web/HTML/Content_categories#phrasing_content), which triggers [React validateDOMNesting](https://www.dhiwise.com/post/mastering-validatedomnesting-best-practices).
129131

130132
### `portals.createSvgPortalNode([options])`
131133

0 commit comments

Comments
 (0)