Livewire 3 Laravel debounce not firing Lifecycle Hooks

39 Views Asked by At

Im trying to use livewire 3 with debounce.500ms but Its not working with the updated hook.

Livewire Compontent Code

class EmailVerify extends Component
{
    public $code; 

    public function updatedCode() 
    {
        dd($this->code);
    }

    public function render()
    {
        return view('livewire.forms.email-verify');
    }
}

My view Code is:

<div>
        <input
            wire:model.debounce.500ms="code"
            id="verifyemail"
            type="text"
            maxlength="4"
            />
</div>

But if I use wire:model.live="code" it will work, but that fires too many network requests.

1

There are 1 best solutions below

0
Tony Sawlwin On
wire:model.live.debounce.1000ms="code"