Building a Live Preview in Livewire: Morphing an Iframe Without Breaking Alpine
How to build a page-builder style live preview in Livewire using an iframe, postMessage and morphdom, and how to survive the three things that break it, Livewire roots, Alpine's MutationObserver, and injected script tags.
- #Livewire
- #Alpine.js
- #Laravel
9 min read