Загрузка видео...

Не удалось загрузить видео

На главную

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 просмотров • 2 лет назад •via X (Twitter)

Комментарии: 11

Фото профиля Ben Holmes
Ben Holmes2 лет назад

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
Ben Holmes2 лет назад

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

Фото профиля Sean Roberts
Sean Roberts2 лет назад

No frickin way

Фото профиля Anthony Holmes
Anthony Holmes2 лет назад

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

Фото профиля PatrickJS
PatrickJS2 лет назад

Yes

Фото профиля moeritz.io 🦋
moeritz.io 🦋2 лет назад

so this is basically inertia.js just with astro

Фото профиля Ben Holmes
Ben Holmes2 лет назад

yup

Фото профиля Dan
Dan2 лет назад

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

Фото профиля Ben Holmes
Ben Holmes2 лет назад

I like the way you think 👀

Фото профиля Diego Enjamio
Diego Enjamio2 лет назад

How is this different from inertia? It seems very similar

Фото профиля Ben Holmes
Ben Holmes2 лет назад

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)

Похожие видео