Overview of Livewire Component Lifecycle Hooks
Livewire provides several lifecycle hooks that allow developers to execute code at specific points during a component's existence, such as initialization, property updates, and rendering.
| Hook Method | Description |
|---|---|
mount() | Called when the component is first created |
hydrate() | Called when the component is re-hydrated at the start of subsequent requests |
boot() | Called at the start of every request (both initial and subsequent) |
updating() | Called before a component property is updated |
updated() | Called after a property has been updated |
rendering() | Called before render() is invoked |
rendered() | Called after render() has been invoked |
dehydrate() | Called at the end of every component request |
exception($e, $stopPropagation) | Called when an exception occurs |