Skip to content

Latest commit

 

History

History
21 lines (18 loc) · 356 Bytes

lazy-loading.md

File metadata and controls

21 lines (18 loc) · 356 Bytes

📈 Use lazy loading

Example:

Add the placeholder method in the component class:

public function placeholder(): string
{
    return <<<'HTML'
        <div>
            <!-- Loading spinner... -->
            <svg>...</svg>
        </div>
    HTML;
}

Add the component with the lazy attribute:

<livewire:component-name lazy />