Level 122
how long does it take to render the page?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I am using the 'Create a Livewire Counter Component' example from the Livewire 3 documentation.
I am new to Livewire and don't understand why it takes 1.5 seconds to update the number when incrementing or decrementing. I'm running this on localhost. Is because of server call
php artisan make:livewire counter
namespace App\Livewire;
use Livewire\Component;
class Counter extends Component
{
public $count = 1;
public function increment()
{
$this->count++;
}
public function decrement()
{
$this->count--;
}
public function render()
{
return view('livewire.counter');
}
}
<div>
<h1>{{ $count }}</h1>
<button wire:click="increment">+</button>
<button wire:click="decrement">-</button>
</div>
Please or to participate in this conversation.