Open yusukebe opened 6 months ago
Just to confirm the direction, are you thinking of implementing a component that outputs HTML comments in SSR or something in that direction?
Hi @yasuaki640
No particular direction. Either is fine if we can make it possible.
And, I'm not picky about using comments. If we can get the React hydration right and not break the HTML structure with it, it's OK.
The approach we should adopt is subtle, but the following code can be spit out of React, which may achieve the objective. 😵💫
<script>
document.write('<!--honox-island component-name:islands_badge.tsx data-serialized-props:'{"name":"Hono"}'-->')
document.currentScript.remove()
</script>
<div>
Hey Hono!
</div>
<script>
document.write('<!--/honox-island-->')
document.currentScript.remove()
</script>
What is the feature you are proposing?
This does not request a new feature but is about implementation.
Currently, to mark a component as an island component, we use
hono-island
tag like the following:But, this cause some problems:
So, instead, perhaps, we may use a comment:
If this method will resolve some issues, we must try implementing it.