Advanced trait design

Advanced trait design

Let's look at the same trait again. It does two interesting things.

  1. Livewire::listen() is superior to hydrate* and dehydrate* when you need access to specific parts of the lifecycle

  2. The instanceof self check scopes the listener to the component