Why Updating Alpine.js State with Direct Reassignment Fails (and How to Fix It)
More from AndyJarrett.com
Photo by Ales Krivec on Unsplash When working with Alpine.js templates, I ran into an issue where only the first child element inside a <template> tag is rendered, leaving subsequent elements mysteriously absent. Understanding the Problem Consider the following code: <template x-if="products.product_id"> <a...
Photo by NASA on Unsplash TL;DR: Updated project code here: github.com/andyj/svrjs-with-docker How to Use SVR.js to Run Server-Side JavaScript Building on the Basics In my previous post, How to Run SVR.js with Docker Compose, I introduced a simple way to set up SVR.js for serving static files using Docker Compose. Since then, I’ve expanded the...
Photo by Florian Olivo on Unsplash TL;DR: Project code here: github.com/andyj/svrjs-with-docker Why SVR.JS? SVR.JS is a lightweight and efficient web server designed to serve static files effortlessly. It's great for scenarios where you need a quick and reliable solution to host static content without the overhead of traditional web...
Photo by Alec Weir on Unsplash TL;DR: Find the GitHub project here: github.com/andyj/mariadb-connection-pool Why Use a Connection Pool? Database connection pooling critical for your web applications. Without a pool, every database query spins up a new connection which startes eating up your resources! A connection pool keeps a stash of open...
Photo by Brina Blum on Unsplash From a conversation on the Working Code Podcast Discord channel I came across a change between Lucee 5 to Lucee 6, and how variables are scoped and handled, specifically when/if using var in a .cfm template. This post is just the sample code I used to do some digging on how the scoping...