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

youcefkacem's avatar

when did livewire component load

hello guys i want to ask something , i have a left sidebar component has a dynamic content depends on the routes inside this sidebar component i placed four components component for the home page , component for the contacts age ,component for the about page , and component for the users page each of these component inside an if statement depends on the route we're in , so i want to know when i load the home page is all the component load or just the component inside the home page route are load

0 likes
2 replies
Snapey's avatar

component is mounted when you load it within the page.

if the component is excluded by @if statement then it is not mounted.

_hiro's avatar

When you load the Home page, only the Home component will load. The other components (Contacts, About, Users) won't load until you go to their specific routes.

This means that each component only loads when you actually navigate to it, which helps keep your app fast.

Best Regards

1 like

Please or to participate in this conversation.