正在加载视频...

视频加载失败

People really sleeping on <script> 🙄 Astro lets you put TypeScript and npm packages in there. Who needs a framework when you have the DOM at home?

311,416 次观看 • 1 年前 •via X (Twitter)

10 条评论

Brandon Webster 的头像
Brandon Webster1 年前

“We have DOM at home” DOM at home: (jk tho Astro is dope.)

Elad Rosenheim 🇮🇱🇺🇦 的头像
Elad Rosenheim 🇮🇱🇺🇦1 年前

If only I could have some minimal state and event handlers straight in Astro components, I wouldn't have to reach for React (or do more boilerplate instead). On one hand, who needs more frameworks. On the other, a very lightweight native solution would go a long way...

Mike Chong (WildCat) 🏔️⭐️ 的头像
Mike Chong (WildCat) 🏔️⭐️1 年前

Welcome back to jQuery

Robert van Hoesel 的头像
Robert van Hoesel1 年前

Whoever is running your socials is doing an astronomical job

@otomir23.me 🦋 的头像
@otomir23.me 🦋1 年前

the point of frameworks is simple state binding, not "typescript and npm packages"

Brandon McConnell 的头像
Brandon McConnell1 年前

Much of this is why I actually switched to using frameworks over plain JS – `querySelector` is not scoped, so something general like `querySelector('button')` would target the first button found on the page – many of the benefits of frameworks involve getting away from manual `addEventListener` calls and manually using `textContent`, `setHTML`, etc. and toward dynamic reactivity Granted, the proposed Signals API will hopefully alleviate some of this — Some examples – with svelte: – with plain js:

Ryan Dsouza 的头像
Ryan Dsouza1 年前

It’s amazing! I did the same with HTMX and no framework needed :)

👩🏾‍💻𝕺𝖐𝖔𝖗𝖔 𝕽𝖊𝖉𝖊𝖒𝖕𝖙𝖎𝖔𝖓💻 的头像
👩🏾‍💻𝕺𝖐𝖔𝖗𝖔 𝕽𝖊𝖉𝖊𝖒𝖕𝖙𝖎𝖔𝖓💻1 年前

It's scary how easy this is 😅

Avily Silva 的头像
Avily Silva1 年前

What's that ? Man Astro is reactive by default ? 😦

xHomu 的头像
xHomu1 年前

Bring back jQuery?

相关视频