What seems to be the problem:
hydrate function does not work according to videos
Steps to Reproduce:
just follow the video “lifecycle-hooks”
if you type into the input field the hydrate method doe not work at all
Are you using the latest version of Livewire:
2.3 (yes)
Do you have any screenshots or code examples:
<?php
namespace App\Http\Livewire;
use Illuminate\Http\Request;
use Livewire\Component;
class LifecycleHooks extends Component
{
public $name = 'Jelly';
public function mount($name)
{
$this->name = $name;
}
public function hydrate()
{
$this->name = 'teetetetet';
}
public function render()
{
return view('livewire.lifecycle-hooks');
}
}
<div>
<input wire:model="name" type="text">
TEST {{ $name }}
</div>