v1 LiVue v1 is here — server-driven reactivity for Laravel using Vue.js Get Started →

Features

Feature Showcase: Streaming

Stream server chunks in real time with v-stream and livue.stream().

How it works

This example uses WithStreaming on the PHP component and v-stream targets in the template. The button calls livue.stream('generatePreview') to receive chunks progressively.

v-stream target (append)

Press "Start streaming" to receive chunks from the server.

v-stream.replace target

Ready

Server status: Ready

Final server value

No final text yet.

Streaming in progress...
app/LiVue/StreamingDemo.php
use LiVue\Features\SupportStreaming\WithStreaming;

public function generatePreview(): void
{
    $this->stream('output', '', true);

    foreach ($tokens as $token) {
        $this->stream('output', $token . ' ');
    }
}
resources/views/livue/streaming-demo.blade.php
<div v-stream="'output'"></div>
<p v-stream.replace="'status'"></p>

<button @click="livue.stream('generatePreview')">
    Start streaming
</button>