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
React (and HTML, for that matter) don't really like it when <div> is inside <p>. This happens when I portal inside markdown (where virtually everything is inside a <p>), for portalling a video, for example.
So, I would like the option to use inline portal element (outputting <span>). Perhaps ELEMENT_TYPE_HTML could be renamed to ELEMENT_TYPE_HTML_BLOCK and add ELEMENT_TYPE_HTML_INLINE
Here's the error for the placeholder. There's another for the portal container. I'll make a PR to fix both of these.
This adds `createHtmlInlinePortalNode` to the public api,
which creates a `<span>` instead of `<div>` wrapper.
This is helpful when portalling into phrasing content.
For example, placing a portal inside `<p>` [0]
Without this, React will emit hydration warnings.
Resolveshttptoolkit#44
[0] https://html.spec.whatwg.org/multipage/grouping-content.html#the-p-element
React (and HTML, for that matter) don't really like it when
<div>
is inside<p>
. This happens when I portal inside markdown (where virtually everything is inside a<p>
), for portalling a video, for example.So, I would like the option to use inline portal element (outputting
<span>
). PerhapsELEMENT_TYPE_HTML
could be renamed toELEMENT_TYPE_HTML_BLOCK
and addELEMENT_TYPE_HTML_INLINE
Here's the error for the placeholder. There's another for the portal container. I'll make a PR to fix both of these.
The text was updated successfully, but these errors were encountered: