正在加载视频...

视频加载失败

stumbled on a new Livewire pattern I'm pretty excited about - check it

45,686 次观看 • 2 年前 •via X (Twitter)

11 条评论

Caleb Porzio 的头像
Caleb Porzio2 年前

I'll probably record a screencast or something showing you how soon

Ryan Bilesky 的头像
Ryan Bilesky2 年前

Is the secret to use wire:model.optimistic? And if not could it be made that simple? Or maybe it's already simple enough idk.

Caleb Porzio 的头像
Caleb Porzio2 年前

ooooh that'd be a pretty cool API

Birk Jernström 的头像
Birk Jernström2 年前

Your short-form demos are 🔥 Really impressed with what you're building with Livewire! Just sent a DM (it's not a nudge to update Chrome) 🙊

Caleb Porzio 的头像
Caleb Porzio2 年前

hahaha, not updating chrome is my brand now, have to stay consistent with it

Ade 的头像
Ade2 年前

What happens if the server fails to fulfill the request? Does the item come back for the DELETE request?

Caleb Porzio 的头像
Caleb Porzio2 年前

I believe so yes

Lazarus / hx-pod / hypermedia-tv 的头像
Lazarus / hx-pod / hypermedia-tv2 年前

when I stumble on stuff it’s like “neat a new hot key for Terminal”. This is less a stumble and more a perfect 10 dismount

TJ Barber 的头像
TJ Barber2 年前

Dude doing things optimistically like this makes sense 90% of the time. Looks and performs so fluidly. I'm looking forward to that screencast!

Daniel Weaver 的头像
Daniel Weaver2 年前

Really interested in your method here. My initial thought would be to push/mutate items directly on $​wire.items array and then AlpineJS loop over those to render the items. Finally set a watcher on the $​wire.items and call an update method to do the server side logic.

Caleb Porzio 的头像
Caleb Porzio2 年前

right, so that's the way you would THINK to do it, but this is a much simpler way - maybe I'll record something demoing the technique tomorrow

相关视频