News for hackers. Stuff that matters.
Re:Alpine.js by neovive on Friday January 13, 2023 @09:04AM (#34367870)
I've been using AlpineJS on various projects for about one year. The creator (Caleb) is actually a Laravel developer and maintains the Livewire meta framework.

I find the sweet spot for utility frameworks like AlpineJS is when used in conjunction with server-side components [1]. For example, when designing server-side Blade components, the more you can keep within the component itself (e.g. html, styles, interactivity), the easier it is to reason about and maintain the component going forward. If your x-data function becomes unwieldy, consider moving the code to a separate Javascript function that returns an object and calling that function from x-data.

Ultimately, using tools like Alpine or Tailwind is a tradeoff. My apps tends to be relatively small and only managed by myself or a small team. If you're building large, front-end heavy apps; React, Vue, Svelte, etc. are definitely a better fit.

[1] Laravel Blade Components: https://laravel.com/docs/9.x/blade#components)

Re:Alpine.js by freedomben on Friday January 13, 2023 @01:04PM (#34371467)
The use with Livewire is part of what makes it such an awesome tool to pair with Elixir LiveView. I mainly just need enough js to do client-side things (like closing/opening menus) and it's perfect for that.
Re:Alpine.js by j45 on Friday January 13, 2023 @02:27PM (#34372637)
Livewire itself is worthy of attention.
Re:Alpine.js by heatmiser on Friday January 13, 2023 @06:01PM (#34375123)
And Elixir Phoenix LiveView for that matter
Re:Alpine.js by neovive on Saturday January 14, 2023 @09:49AM (#34380695)
AlpineJS is actually going to be bundled by with Livewire 3, when released.