Beyond the Mouse: Animating with Mobile Accelerometers
Mousing over an element and watching it tilt in 3D space is a beautiful and compelling effect. Let’s bring it to mobile and use the phone itself rather than a cursor.
Mousing over an element and watching it tilt in 3D space is a beautiful and compelling effect. Let’s bring it to mobile and use the phone itself rather than a cursor.
Despite some not-great recent news about security vulnerabilities, React Server Components (RSCs) are likely in pretty high volume use around the internet thanks to default usage within Next.js, perhaps without users even really knowing it. I enjoyed Nadia Makarevich’s performance-focuced look at them in Bundle Size Investigation: A Step-by-Step Guide to Shrinking Your JavaScript. The […]
Bramus wrote this almost a year ago, but I’d still call it a relatively new feature of JavaScript and one very worth knowing about. With Node.prototype.moveBefore you can move elements around a DOM tree, without resetting the element’s state. You don’t need it to maintain event listeners, but, as Bramus notes, it’ll keep an iframe loaded, animations […]
You can use a smaller part of Lit to build web web components that still take advantage of some of it’s best features, particularly if you’re cool with Light DOM.
Matt Smith with wonderfully straightforward writing on why default parameters for functions are a good idea. I like the tip where you can still do it with an object-style param.
A satisfying little rant from Justin Fagnani: Stop Using CustomEvent. One point is that you’re forcing the consumer of the event to know that it’s custom and you have to get data out of the details property. Instead, you can subclass Event with new properties and the consumer of that event can pull that data […]
Alex MacArthur shows us there are a lot of ways to break up long tasks in JavaScript. Seven ways, in this post. That’s a senior developer thing: knowing there are lots of different ways to do things all with different trade-offs. Depending on what you need to do, you can hone in on a solution.
TanStack Start is one of the most exciting full-stack web development frameworks I’ve seen. I’ve written about it before. In essence, TanStack Start takes TanStack Router, a superb, strongly-typed client-side JavaScript framework, and adds server-side support. This serves two purposes: it gives you a place to execute server-side code, like database access; and it enables […]
In A Progressive Enhancement Challenge, I laid out a situation where the hardest thing to do is show a button you never want to show at all if the JavaScript loads and executes properly. I wrote of this state: It seems like the ideal behavior would be “hide the interactive element for a brief period, […]
All sorts of inputs have little microphone buttons within them that you can press to talk instead of type. Honestly, I worry my daughter will never learn to type because of them. But I get it from a UX perspective, it’s convenient. We can put those in our web apps, too. Pamela Fox has an […]
Frontend Masters donates to open source projects through thanks.dev and Open Collective, as well as donates to non-profits like The Last Mile, Annie Canons, and Vets Who Code.