Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

What if you could execute code in the server from JSX? <button onClick={server$(() => console.log('server'))}> Runs in server </button> Stop dreaming and try Qwik 🤯🤯🤯

323,399 görüntüleme • 3 yıl önce •via X (Twitter)

11 Yorum

Manu (Qwik) profil fotoğrafı
Manu (Qwik)3 yıl önce

Under the hood all this tech is using the same resumability and serialization primitives that allow @QwikDev to completely avoid hydration and keep apps extremely fast and light!

Manu (Qwik) profil fotoğrafı
Manu (Qwik)3 yıl önce

And yes! we can also make this work without any JS at all, using native forms!

Manu (Qwik) profil fotoğrafı
Manu (Qwik)3 yıl önce

If you wanna see it working a bit more in detail, recorded a loom, it can even capture closure state across server/browser!

Norwegian Blue 🦜 profil fotoğrafı
Norwegian Blue 🦜3 yıl önce

@QwikDev Y'all just invented postbacks from 2004

Helge Ahrens profil fotoğrafı
Helge Ahrens3 yıl önce

@QwikDev Is it the same as solids server function that creates an api endpoint under the hood?

Manu (Qwik) profil fotoğrafı
Manu (Qwik)3 yıl önce

@QwikDev This is built on top of the existing compiler for @QwikDev, reusing the same QRL mechanism, so I can imagine they are very different under the hood, but similar uses cases

Adam Bradley ⚡️ profil fotoğrafı
Adam Bradley ⚡️3 yıl önce

@QwikDev But my friend, how could this ever be possible?! What if I referenced a variable in the scoped?! Won't this be megabytes of JS!? What about progressive enhancement!? How could this possibly work for both MPA and SPA?!

Leifer Mendez (🧑‍💻) profil fotoğrafı
Leifer Mendez (🧑‍💻)3 yıl önce

@QwikDev pff!!! I don't know HOW it is possible 🤯. I just can say I wanna try it

Manu (Qwik) profil fotoğrafı
Manu (Qwik)3 yıl önce

@QwikDev and the feat PR is only ~90 lines of code

Filip Rakowski profil fotoğrafı
Filip Rakowski3 yıl önce

@QwikDev As much as I love this idea it's very important to document it Ina. Way that won't result in overusing it for simple, atomic operations. This will lead to the opposite outcome than intended

Manu (Qwik) profil fotoğrafı
Manu (Qwik)3 yıl önce

@QwikDev agreed! a great power comes with great responsibility

Benzer Videolar