Video wird geladen...
Video konnte nicht geladen werden
Crazy thought: What if Astro took over views/ for any framework? Got an early Ruby on Rails prototype running. Query in a controller, return props, use them in your component. Like the network isn’t even there 🪄
105,067 Aufrufe • vor 2 Jahren •via X (Twitter)
11 Kommentare

Want to streamline this to feel exactly like Ruby on Rails templates. Namely, no “render json” call. Also need to figure out production build best practices. Prototype if you’re curious!

Update: TIL about Concerns. Just "include Astro" in your controller and we can magically render the right template! Ruby is wild

No frickin way

Yes! I bet Laravel devs would be very open to this

Yes

so this is basically inertia.js just with astro

yup

Would Astro then replace Pug, for example, in Express web apps? 👀

I like the way you think 👀

How is this different from inertia? It seems very similar

It's super similar! We're just unlocking Astro templates instead of client-side React, Vue, or Svelte. These let you - start from plain HTML - embed component frameworks when you need it - reach for view transitions to make routing feel nice (notice the fade in my demo)
