# Defer 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.

```html
<cfoutput>
<div wire:init="loadTasks">
    <ul>
        <cfloop array="#args.tasks#" index="task">
            <li>#task#</li>
        </cfloop>
    </ul>
</div>
</cfoutput>

<cfscript>
    data = {
        "tasks": []
    };
    
    function loadTasks() {
        data.tasks = getInstance( "TaskService" ).asMemento().get()
    }
</cfscript>
```

{% hint style="info" %}
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.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cbwire.ortusbooks.com/3.x/template-features/defer-loading.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
