Prefetching
Prefetch component updates as the user mouses over HTML elements.
<button wire:click.prefetch="togglePreview">Show Preview</button><!--- ./wires/ShowImage.cfm --->
<cfoutput>
<div>
<button wire:click.prefetch="togglePreview">Show Preview</button>
<cfif showPreview>
<!--- Preview goes here --->
</cfif>
</div>
</cfoutput>
<cfscript>
data = {
"showPreview": false
};
function togglePreview(){
data.showPreview = true;
}
</cfscript>Last updated