Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

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 görüntüleme • 2 yıl önce •via X (Twitter)

11 Yorum

Ben Holmes profil fotoğrafı
Ben Holmes2 yıl önce

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 profil fotoğrafı
Ben Holmes2 yıl önce

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

Sean Roberts profil fotoğrafı
Sean Roberts2 yıl önce

No frickin way

Anthony Holmes profil fotoğrafı
Anthony Holmes2 yıl önce

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

PatrickJS profil fotoğrafı
PatrickJS2 yıl önce

Yes

moeritz.io 🦋 profil fotoğrafı
moeritz.io 🦋2 yıl önce

so this is basically inertia.js just with astro

Ben Holmes profil fotoğrafı
Ben Holmes2 yıl önce

yup

Dan profil fotoğrafı
Dan2 yıl önce

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

Ben Holmes profil fotoğrafı
Ben Holmes2 yıl önce

I like the way you think 👀

Diego Enjamio profil fotoğrafı
Diego Enjamio2 yıl önce

How is this different from inertia? It seems very similar

Ben Holmes profil fotoğrafı
Ben Holmes2 yıl önce

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)

Benzer Videolar