https://abs.twimg.com/emoji/v2/... draggable="false" alt="🧐" title="Gesicht mit Monokel" aria-label="Emoji: Gesicht mit Monokel"> Obscure Livewire Tips

Little-known tips & trick that can significantly improve your Livewire apps.

https://abs.twimg.com/emoji/v2/... draggable="false" alt="🔴" title="Roter Kreis" aria-label="Emoji: Roter Kreis"> LIVE THREAD: 1 tip every 15 minutes. Each one will be more unknown than the previous one https://abs.twimg.com/emoji/v2/... draggable="false" alt="👀" title="Augen" aria-label="Emoji: Augen">
https://abs.twimg.com/emoji/v2/... draggable="false" alt="🔥" title="Feuer" aria-label="Emoji: Feuer"> Share state with Sprucewire

If you have two components that share some state, and you& #39;d like to keep them in sync in a more effective way than dispatching listeners back and forth, check out Sprucewire.

It works almost like Vuex for Livewire. https://twitter.com/_joshhanley/status/1362646916333334528">https://twitter.com/_joshhanl...
Here& #39;s an example taken from Lean. When a user tries to edit the ID of the currently edited resource, an error is shown as if there were no such public property.

Readonly properties are not a native feature of Livewire, but they can be added using my package.
And that& #39;s it for this thread. You can download the code snippets from this thread using the links below

https://abs.twimg.com/emoji/v2/... draggable="false" alt="✨" title="Funken" aria-label="Emoji: Funken"> Follow @LaravelCodeTips

https://abs.twimg.com/emoji/v2/... draggable="false" alt="🔥" title="Feuer" aria-label="Emoji: Feuer"> Read this thread online: https://laravel-code.tips/threads/obscure-livewire-tips/

https://laravel-code.tips/threads/o... class="Emoji" style="height:16px;" src=" https://abs.twimg.com/emoji/v2/... draggable="false" alt="⬇️" title="Pfeil nach unten" aria-label="Emoji: Pfeil nach unten"> Download bonuses: https://laravel-code.tips/threads/obscure-livewire-tips/download

https://laravel-code.tips/threads/o... class="Emoji" style="height:16px;" src=" https://abs.twimg.com/emoji/v2/... draggable="false" alt="📧" title="E-Mail Symbol" aria-label="Emoji: E-Mail Symbol"> Join the newsletter: https://newsletter.laravel-code.tips"> https://newsletter.laravel-code.tips 
You can follow @samuelstancl.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: