Loading video...

Video Failed to Load

Go Home

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

45,676 views • 2 years ago •via X (Twitter)

11 Comments

Caleb Porzio's profile picture
Caleb Porzio2 years ago

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

Ryan Bilesky's profile picture
Ryan Bilesky2 years ago

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's profile picture
Caleb Porzio2 years ago

ooooh that'd be a pretty cool API

Birk Jernström's profile picture
Birk Jernström2 years ago

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's profile picture
Caleb Porzio2 years ago

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

Ade's profile picture
Ade2 years ago

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

Caleb Porzio's profile picture
Caleb Porzio2 years ago

I believe so yes

Lazarus / hx-pod / hypermedia-tv's profile picture
Lazarus / hx-pod / hypermedia-tv2 years ago

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's profile picture
TJ Barber2 years ago

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's profile picture
Daniel Weaver2 years ago

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's profile picture
Caleb Porzio2 years ago

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

Related Videos