github livewire/livewire v0.7.0

latest releases: v3.4.11, v3.4.10, v3.4.9...
4 years ago

Upgrade Guide

  • Livewire's before/afterDomUpdate hook has been conformed to the new standard for registering hooks.
// Before
window.livewire.beforeDomUpdate(() => {})
window.livewire.afterDomUpdate(() => {})

// After
window.livewire.hook('beforeDomUpdate', ({ html }) => {})
window.livewire.hook('afterDomUpdate', () => {})

Release Notes

Added

  • Allow "single-value" event listeners:
    protected $listeners = ['open' => 'open']; can now be shortened to: protected $listeners = ['open'];
  • Ability to update the query string from public property data changes:
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);
        ...

Changed

  • livewire.beforeDomUpdate(callback) ->livewire.hook('beforeDomUpdate', callback)
  • livewire.afterDomUpdate(callback) ->livewire.hook('afterDomUpdate', callback)

Fixed

  • Fix broken IE 11 support by adding missing polyfills #529
  • Fix compatibility with PHP 7.1 #525
  • Prevent creating Livewire components with reserved PHP class names like Parent::class #531
  • Fixed matrix CI build && Add support for Laravel 7.x #536

Don't miss a new livewire release

NewReleases is sending notifications on new releases.