Comment by adevilinyc
Comment by adevilinyc 4 days ago
I'm building Mighty, a library that lets you render Astro components everywhere.
(Will probably register a proper domain name close to release)
Historically, Astro hasn't had an API like renderToString for React/Vue/etc. that takes a component and renders it on the server. That changed with the release of the Container API last year: https://docs.astro.build/en/reference/container-reference/
But there are still a lot of rough edges:
- Importing components is a hassle (you have to go dig through the Astro manifest or create a TS file that exports all your components)
- No Vite integration (so no local dev support, or hot reload)
- No styling support (this is probably the biggest one)
Mighty will provide dev + styling support and a simple way to import your Astro components, with adapters for Hono and Laravel when first releasing. For Hono, it should be as simple as writing a few lines of code:
https://go-mighty.vercel.app/guides/backend-adapters/hono/#r...
Still WIP, but I hope to have something out by the end of the year! Let me know what you think.
(And yes, I wrote the docs before the code! It helps me structure my API design far better, even if not perfectly)