Skip to content

Commit 08137cc

Browse files
committed
Add note about htmx/hotwire
1 parent 2144c0f commit 08137cc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,10 @@ Publisher::publish($update);
319319

320320
#### Publishing Rendered Views
321321

322-
Use the `ViewUpdate` class to automatically render CakePHP views or elements and publish the rendered HTML:
322+
Use the `ViewUpdate` class to automatically render CakePHP views or elements and publish the rendered HTML.
323+
324+
> [!NOTE]
325+
> This is especially handy when using JavaScript frameworks like [htmx](https://htmx.org/) (for instance, using the [htmx-sse extension](https://htmx.org/extensions/sse/)), [Hotwire](https://hotwired.dev/) (with [Turbo Streams](https://turbo.hotwired.dev/handbook/streams)), or similar reactive libraries, which can consume and swap HTML fragments received over Mercure for seamless real-time UI updates.
323326
324327
```php
325328
use Mercure\Publisher;

0 commit comments

Comments
 (0)