Skip to content

Commit d505dbd

Browse files
committed
Tweaks
1 parent 964b84a commit d505dbd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/livewire.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ Livewire has an [official plugin](https://github.com/livewire/turbolinks) that b
1111
To use it, all we need to do is add the CDN script after the Livewire Scripts, something like this:
1212

1313
```blade
14-
<-- ... -->
14+
<!-- ... -->
1515
1616
@livewireScripts
1717
<script src="https://cdn.jsdelivr.net/gh/livewire/[email protected]/dist/livewire-turbolinks.js" data-turbo-eval="false"></script>
1818
</body>
1919
```
2020

21-
When you install Turbo Laravel using the `--jet` flag, this gets automatically added to your `main` and `guest` layouts, since Jetstream uses Livewire.
21+
When you install Turbo Laravel using the `--jet` flag, this gets automatically added to your `app` and `guest` layouts, since Jetstream uses Livewire.
2222

2323
## Deeper Integration
2424

@@ -92,9 +92,11 @@ if (customElements.get('turbo-livewire-stream-source') === undefined) {
9292
Now, we can use this element in a page where we want to have the integration between Livewire and Turbo.js (or in a base layout if you want it applied application-wide):
9393

9494
```blade
95+
9596
<turbo-livewire-stream-source />
9697
9798
<livewire:counter />
99+
98100
```
99101

100102
That's it! With that, we got Livewire to generate Turbo Streams, dispatch it as a browser event, which gets intercepted by our custom HTML element and applied to the page!

0 commit comments

Comments
 (0)