github alpinejs/alpine v1.6.0
on GitHub

Upgrade Guide

  • Convert all instances of x-init to x-created:
    html <div x-data="{ foo: 'bar' }" x-init=" = 'baz"> <!-- To: --> <div x-data="{ foo: 'bar' }" x-created=" = '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
7 months ago