Lifecycle Methods

Various component lifecycle events you can leverage for your needs.

CBWIRE includes various lifecycle hooks that let you execute code at specific stages in a component's lifecycle. These hooks allow you to perform tasks before or after key events, such as component initialization, property updates, or template rendering.

Here's an overview of the component lifecycle hooks available in CBWIRE:

Hook MethodDescription

onMount()

Triggered when a component is first created.

onHydrate()

Runs when a component is re-hydrated at the start of a follow-up request.

onBoot()

Executes at the beginning of every request, initial and subsequent.

onUpdating()

Invoked before a component's property gets updated.

onUpdated()

Runs after a property has been updated.

onRendering()

Called just before the render() method executes.

onRendered()

Executes immediately after the render() method runs.

onDehydrate()

Triggered at the end of each component request.

onException()

Called when an exception occurs.

Last updated