Loading video...

Video Failed to Load

Go Home

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,083 views • 2 years ago •via X (Twitter)

11 Comments

Ben Holmes's profile picture
Ben Holmes2 years ago

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!

Ben Holmes's profile picture
Ben Holmes2 years ago

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

Sean Roberts's profile picture
Sean Roberts2 years ago

No frickin way

Anthony Holmes's profile picture
Anthony Holmes2 years ago

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

PatrickJS's profile picture
PatrickJS2 years ago

Yes

moeritz.io 🦋's profile picture
moeritz.io 🦋2 years ago

so this is basically inertia.js just with astro

Ben Holmes's profile picture
Ben Holmes2 years ago

yup

Dan's profile picture
Dan2 years ago

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

Ben Holmes's profile picture
Ben Holmes2 years ago

I like the way you think 👀

Diego Enjamio's profile picture
Diego Enjamio2 years ago

How is this different from inertia? It seems very similar

Ben Holmes's profile picture
Ben Holmes2 years ago

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)

Related Videos