Tag Archives: javascript
Demystifying styled-components
Josh W. Comeau lays out the details how styled-components works internally. For so many React devs, styled-components seems kinda magical. It isn’t at all clear how it uses traditional CSS features under-the-hood, and that lack of clarity can cause real problems when things go awry. In this post, we’ll learn exactly how styled-components works by …
Beginner JavaScript Notes + Reference
Visualizing DOM Events
Rethinking JavaScript Infrastructure
Christoph Nakazawa, former Engineering Management at Facebook and now Front End Engineer at Stripe, is writing a series about JavaScript infrastructure. In this second part of this still in progress series he digs into eliminating the ongoing need for installing dependencies from the development iteration cycle. I provide recommendations that I personally implemented and have …
Konva.js — HTML5 Canvas JavaScript framework
For all your working-with-layers-on-<canvas> needs: Konva is an HTML5 Canvas JavaScript framework that enables high performance animations, transitions, node nesting, layering, filtering, caching, event handling for desktop and mobile applications, and much more. You can draw things onto the stage, add event listeners to them, move them, scale them, and rotate them independently from other …
Continue reading “Konva.js — HTML5 Canvas JavaScript framework”
Modern Javascript: Everything you missed over the last 10 years
Solving a Mystery Behavior of parseInt()
in JavaScript
Dmitri Pavlutin digs into why parseInt(0.0000005); evaluates to 5: parseInt(0.5); // => 0 parseInt(0.05); // => 0 parseInt(0.005); // => 0 parseInt(0.0005); // => 0 parseInt(0.00005); // => 0 parseInt(0.000005); // => 0 parseInt(0.0000005); // => 5 🤯 Solving a Mystery Behavior of parseInt() in JavaScript → On a related note, Yannick Clybouw recently hit …
Continue reading “Solving a Mystery Behavior of parseInt()
in JavaScript”
Lazy loading JavaScript using IntersectionObserver
Jonathan Neal dissects the Islands Architecture approach behind Astro. During the presentation, Fred demonstrates dynamically loading JS using “Islands Architecture”,a strategy where small HTML placeholders are progressively upgraded with dynamic or interactive content as-needed. The demonstration involves waiting on the viewport visibility of a div placeholder before loading some JS. Using an IIFE an IntersectionObserver …
Continue reading “Lazy loading JavaScript using IntersectionObserver
“
A Beginner’s Guide To Proxies in JavaScript
In JavaScript one of the most important data types is Object. Sometimes we want to have more control over certain objects, such as being able to listen to who is reading the object property or updating. One of the best ways to control an object is with a Proxy. You can do a lot of …
Continue reading “A Beginner’s Guide To Proxies in JavaScript”