Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

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

45,677 Aufrufe • vor 2 Jahren •via X (Twitter)

11 Kommentare

Profilbild von Caleb Porzio
Caleb Porziovor 2 Jahren

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

Profilbild von Ryan Bilesky
Ryan Bileskyvor 2 Jahren

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.

Profilbild von Caleb Porzio
Caleb Porziovor 2 Jahren

ooooh that'd be a pretty cool API

Profilbild von Birk Jernström
Birk Jernströmvor 2 Jahren

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) 🙊

Profilbild von Caleb Porzio
Caleb Porziovor 2 Jahren

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

Profilbild von Ade
Adevor 2 Jahren

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

Profilbild von Caleb Porzio
Caleb Porziovor 2 Jahren

I believe so yes

Profilbild von Lazarus / hx-pod / hypermedia-tv
Lazarus / hx-pod / hypermedia-tvvor 2 Jahren

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

Profilbild von TJ Barber
TJ Barbervor 2 Jahren

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

Profilbild von Daniel Weaver
Daniel Weavervor 2 Jahren

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.

Profilbild von Caleb Porzio
Caleb Porziovor 2 Jahren

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

Ähnliche Videos