Defer Loading

Improve user's perceived load times by using deferred loading.

CBWIRE allows you to call an action immediately once your component is rendered.

You can do this by adding the wire:init directive to your component's outer element.

<div wire:init="loadTasks">
        <cfloop array="#args.tasks#" index="task">

    data = {
        "tasks": []
    function loadTasks() {
        data.tasks = getInstance( "TaskService" ).asMemento().get()

This can be helpful in cases where you don't want to hold up the page from fully loading but want to load some data immediately after the page load.

Last updated