Comments (3)
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.
from honox.
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>
from honox.
Just to confirm the direction, are you thinking of implementing a component that outputs HTML comments in SSR or something in that direction?
from honox.
Related Issues (20)
- Use mutationObserver to monitor for new components on the screen
- <honox-island> tag breaks direct child CSS HOT 10
- Using the React library in HonoX with hono/jsx/dom HOT 1
- Nested islands hydrate error HOT 1
- Build break by missing file or directory react/jsx-runtime?inside-island HOT 1
- When island components are nested, the child island is broken HOT 6
- Nested islands hydrate error 2 HOT 2
- Support named export not only `default` in Islands HOT 1
- support CSP nonce for `<Script>` component HOT 1
- It would be nice to place islands anywhere, not just in routes and islands directories. HOT 4
- Is it possible to use React component frameworks? HOT 1
- Partials HOT 1
- `Script` and `HasIsland` to be available even if react is used for runtime HOT 2
- `nonce` attribute should be added only in production? HOT 4
- React Server Components (RSC) HOT 1
- routing for .well-known is 404 HOT 1
- _middleware.ts in param router doesn't trigger HOT 4
- Global (or cascading) error page
- Support `.md` / custom extension omission
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from honox.