Turbo: The speed of a single-page web application without having to write any JavaScript

From the folks at Basecamp comes Turbo: Turbo accelerates links and form submissions without requiring you to change your server-side generated HTML. It lets you carve up a page into independent frames, which can be lazy-loaded and operate as independent components. And finally, helps you make partial page updates using just HTML and a set …

content-visiblity: auto; vs. jumpy scrollbars, a solution

As warned in content-visibility: the new CSS property that boosts your rendering performance you need to be careful with applying content-visibility: auto; on each and every element as the scrollbar might get jumpy. This is because elements will be rendered as they scroll into the viewport and will be hidden as they scroll out of …

Deep Dive into Page Lifecycle API

As the name suggests, the Page Lifecycle API exposes the web page lifecycle hooks to JavaScript. However, it isn’t an entirely new concept. Page Visibility API existed for some time, revealing some of the page visibility events to JavaScript. However, if you happen to choose between these two, it’s worth mentioning some of the limitations …

Creating random-but-stable effects with the CSS Paint API

One of the side-effects when drawing things with a Houdini Paint Worklet and relying on Math.random() in your code, is that your layout might be jumpy. Check out my CSS Houdini Paint Worklet that draws colorful circles for example: whenever you resize the available space or change one of its properties — or some of …

Playing with JSX

In The several ways to import React, Kent C. Dodds also covers a bit about JSX and “the JSX pragma”. Here’s a video of CSS Tricks’ Chris Coyier goofing around with it. JSX is not fancy. It essentially transforms angle brackets in JavaScript into function calls. That works great for React, but because we can …

The several ways to import React

With the release of React 17 we also had to change the way we import React: To clarify: ✅ import { useState } from 'react'✅ import * as React from 'react'🟡 import React from 'react' The third one is called "default import" and in the long term (maybe in 19 or 20) we will stop …

Skypack — Load optimized npm packages with no install and no build tools

I was delighted to read that CodePen now has built-in support for Skypack. This is a huge step forward to working with packages on CodePen. Great addition to the product! But what exactly is Skypack? Well, it’s the successor to the aforementioned Pika CDN with some extra juice: Skypack not only serves packages that export …

(t,i,x,y) => “creative code golfing”

Martin Kleppe has created tixy.land, “the most minimalist creative coding environment” as he calls it Control the size and color of a 16×16 dot matrix with a single JavaScript function. The input is limited to 32 characters – but no limits to your creativity! I especially like how the site starts off with some simple …