Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

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

Profilbild von Ben Holmes
Ben Holmesvor 2 Jahren

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!

Profilbild von Ben Holmes
Ben Holmesvor 2 Jahren

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

Profilbild von Sean Roberts
Sean Robertsvor 2 Jahren

No frickin way

Profilbild von Anthony Holmes
Anthony Holmesvor 2 Jahren

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

Profilbild von PatrickJS
PatrickJSvor 2 Jahren

Yes

Profilbild von moeritz.io 🦋
moeritz.io 🦋vor 2 Jahren

so this is basically inertia.js just with astro

Profilbild von Ben Holmes
Ben Holmesvor 2 Jahren

yup

Profilbild von Dan
Danvor 2 Jahren

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

Profilbild von Ben Holmes
Ben Holmesvor 2 Jahren

I like the way you think 👀

Profilbild von Diego Enjamio
Diego Enjamiovor 2 Jahren

How is this different from inertia? It seems very similar

Profilbild von Ben Holmes
Ben Holmesvor 2 Jahren

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)

Ähnliche Videos