The #[Renderless] attribute skips the rendering phase of Livewire's lifecycle when an action is called, improving performance for actions that don't modify the component's view.
Apply the #[Renderless] attribute to any action method that doesn't need to re-render the component:
<?php // resources/views/components/post/⚡show.blade.php
use Livewire\Attributes\Renderless;
use Livewire\Component;
use App\Models\Post;
new class extends Component {
public Post $post;
public function mount(Post $post)
{
$this->post = $post;
}
#[Renderless] // [tl! highlight]
public function incrementViewCount()
{
$this->post->incrementViewCount();
}
};<div>
<h1>{{ $post->title }}</h1>
<p>{{ $post->content }}</p>
<div wire:intersect="incrementViewCount"></div>
</div>The example above uses wire:intersect to call incrementViewCount() when the user scrolls to the bottom. Since #[Renderless] is applied, the view count is logged but the template doesn't re-render—no part of the page is affected.
Use #[Renderless] when an action:
Common use cases include:
If you need to conditionally skip rendering or prefer not to use attributes, you can call skipRender() directly in your action:
<?php // resources/views/components/post/⚡show.blade.php
use Livewire\Component;
use App\Models\Post;
new class extends Component {
public Post $post;
public function incrementViewCount()
{
$this->post->incrementViewCount();
$this->skipRender(); // [tl! highlight]
}
};You can also skip rendering directly from the element using the .renderless modifier:
<button type="button" wire:click.renderless="incrementViewCount">
Track View
</button>This approach is useful for one-off cases where you don't want to add an attribute to the method.
For more information about actions and performance optimization, see the Actions documentation.