For the complete documentation index, see llms.txt. This page is also available as Markdown.

Prefetching

Prefetch state changes when the user mouses over an HTML element. Fantastico!

You can prefetch an Action's results on mouseOver using the .prefetch modifier.

<div>
    <button wire:click.prefetch="togglePreview">Show Preview</button>

    <cfif args.showPreview>
        <!--- Preview goes here --->
    </cfif>
</div>
component extends="cbwire.models.Component"{

    data = {
        "showPreview": false
    };

    function togglePreview(){
        data.showPreview = true;
    }
}

Last updated

Was this helpful?