github alpinejs/alpine v2.0.0
on GitHub

Removed

  • x-created and x-mounted in favor of x-init
    For x-created behavior, use x-init. For x-mounted behavior, return a callback from x-init

Before

<div x-data x-created="doSomething()">
...
<div x-data x-mounted="doSomething()">

After

<div x-data x-init="doSomething()">
...
<div x-data x-init="() => { doSomething() }">
5 months ago