Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

skiarsi's avatar

livewire full page component lazy loading and custom title

Hi everyone I'm working on a full page component project, It's loading lazy.

#[Lazy]
class CarviewComponent extends Component
{
}

When I'm using #[Lazy] Attributes on my class, I can not have custom title:

return view('livewire.carview-component')->title('title');

When I remove #[Lazy] from class, custom title working, but I don't have lazy load to show skeleton. I also couldn't load my component with lazy load method from web.php:

Route::get('/car/{carslug}', CarviewComponent::class)->lazy();

Page is loading, but skeleton loading not showed.

Do you have the same problem or ...?

0 likes
7 replies
vincent15000's avatar

I have also a problem with fullpage lazy loading (not tested with component lazy loading).

The difference with you is the page isn't displayed at all and I get an error.

Property type not supported in Livewire for property: [{}]

The bugs seems to have been reported on github and it's probably a problem with the livewire scripts loading.

But I'm very interested in knowing if you have solved your problem and how.

Chingy's avatar

Sorry for my noob question but doesnt view('my-blade', [ 'title' => $title] work ?

1 like
skiarsi's avatar

@Chingy No. and it's really bad problem in livewire. with this code : view('my-blade', [ 'title' => $title] you will send title variable, but livewire is not accept it, cause livewire just working in body part not head part. after times I see livewire is not a good option, it's seems make web development easy but you have some situations with it that is not big problem on front-end technologies like react or vue or ... , so just leave it.

1 like
skiarsi's avatar

@Chingy can you please send me a active website url that using livewire. I want to check performance of it.

1 like

Please or to participate in this conversation.