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
I haven’t fully thought through this yet, so hoping for some feedback on whether it is viable or breaks too many assumptions.
The goal is to create an escape hatch that would support rendering to conditional comments, alternative method for web components, and other unknown and probably bad ideas.
The first example is the one I’m more interested at this point in time. The benefit here is this could work on both the DOM and server renderer without userland hacks like https://nemisj.com/conditional-ie-comments-in-react-js/ or componentDidMount ref replacement (client only, I believe?).
A couple initial problems I see with this are (may or may not be solvable/avoidable with slight tweaks):
returning an arbitrary object render which isn’t supported
how will unmounting this work?
Alternative proposal:
Introduce a new DOM-renderer primitive <comment /> or <dangerousComment /> (to follow a similar approach to dangerouslySetInnerHTML clearly indicating the caveats that come with rendering comments). This alternative solution only solves the conditional comment issue above.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution.
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!
I haven’t fully thought through this yet, so hoping for some feedback on whether it is viable or breaks too many assumptions.
The goal is to create an escape hatch that would support rendering to conditional comments, alternative method for web components, and other unknown and probably bad ideas.
Something along the lines of:
The first example is the one I’m more interested at this point in time. The benefit here is this could work on both the DOM and server renderer without userland hacks like https://nemisj.com/conditional-ie-comments-in-react-js/ or
componentDidMount
ref replacement (client only, I believe?).A couple initial problems I see with this are (may or may not be solvable/avoidable with slight tweaks):
render
which isn’t supportedAlternative proposal:
Introduce a new DOM-renderer primitive
<comment />
or<dangerousComment />
(to follow a similar approach todangerouslySetInnerHTML
clearly indicating the caveats that come with rendering comments). This alternative solution only solves the conditional comment issue above.The text was updated successfully, but these errors were encountered: