If you're making HTTP requests with JavaScript's Fetch API to web routes in Laravel, you'll need to pass a CSRF token rather than just exclude those routes from CSRF protection.
Occasionally, you'll need to manually re-render a Livewire component to update its contents. Let's discuss a few ways to do this.
Because Livewire and Alpine.js are so tightly linked, calling a Livewire method from your Alpine components is a breeze.
If you have a list of items you need to be able to drag, drop, then set a new order in the database — good news, it's pretty straightforward to do with Livewire and Alpine.
Uploading files in Livewire is super simple — but for larger files, adding a progress bar is a great idea.
If you need to copy text to the clipboard with JavaScript, Alpine.js makes this super easy with the help of a simple plugin.
If you're using Alpine.js and also use a framework like Vue.js, you're probably missing computed properties right now.
Alpine.js is a tiny JavaScript framework that makes declarative rendering super easy, without the weight of larger frameworks like Vue or React. While I was playing around with it, I took some time to build a simple, personal RSS reader for fun. Here's what I came up with!