1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 13:24:03 +00:00
laravel-tips/content/tips/including-a-unique-value-like-now-or-strrandom-in-the-blade-template-of-a-livewire-component-is-a-great-way-to-check-if-that-part-of-the-dom-is-getting-re-rendered.md
2021-11-19 16:10:01 +01:00

797 B

title tweet_id thread_slug author_username images created_at slug
Including a unique value, like now() or Str::random(), in the Blade template of a Livewire component is a great way to check if that part of the DOM is getting re-rendered 1461703833617272840 weekly-thread-2021-46 alexjgarrett
https://pbs.twimg.com/media/FEWOM0UXsAQyJ89.jpg
2021-11-19T14:32:05+00:00 including-a-unique-value-like-now-or-strrandom-in-the-blade-template-of-a-livewire-component-is-a-great-way-to-check-if-that-part-of-the-dom-is-getting-re-rendered

A quick and easy way to check if @LaravelLivewire components are re-rendering when you don't want/need them to.

Add now() or now()->timestamp to your component template. The time value will increment if there's a re-render side effect!