doc: add note to alpine-morph example (#987)

This commit is contained in:
Bojan Mihelac 2022-09-30 21:34:59 +01:00 committed by GitHub
parent d02e24c248
commit 9155a30510
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,6 +36,8 @@ Alpine.js now has a lightweight [morph plugin](https://alpinejs.dev/plugins/morp
In the above example, all the Alpine x-data states (count, replaced, and message) are preserved even the entire Alpine component is swapped.
NOTE: `/swap` response from the example above should return actual element that is being replaced (this is `<div hx-target="this"...` element).
#### Source
<https://unpkg.com/htmx.org/dist/ext/alpine-morph.js>