// Before
window.livewire.beforeDomUpdate(() => {})
window.livewire.afterDomUpdate(() => {})
// After
window.livewire.hook('beforeDomUpdate', ({ html }) => {})
window.livewire.hook('afterDomUpdate', () => {})
class Foo extends Component
{
public $foo = 'bar';
// This makes it so that ?foo=X will be updated in the query string everything the property value changes.
protected $updatesQueryString = ['foo'];
public function mount()
{
// You can easily set the initial value of a property from the query string like you would in a controller.
$this->foo = request()->query('foo', $this->foo);
...