github alpinejs/alpine v1.6.0

latest releases: v3.13.10, v3.13.9, v3.13.8...
4 years ago

Upgrade Guide

  • Convert all instances of x-init to x-created:
<div x-data="{ foo: 'bar' }" x-init="foo.bar = 'baz">
<!-- To: -->
<div x-data="{ foo: 'bar' }" x-created="foo.bar = 'baz">

Added

  • x-created lifecycle hook (runs on initialization, but BEFORE dom elements initialized)
  • x-mounted lifecycle hook (runs on initialization, and AFTER dom elements are initialized)
  • $el magic accessor (access the root dom node of the component)

Fixed

  • Data reactivity from inside extracted components and callbacks
  • Made setting a value for x-data optional

Removed

  • The x-init directive

Don't miss a new alpine release

NewReleases is sending notifications on new releases.