Deep-copying in JavaScript using structuredClone

No more hacking around with the inadequate JSON.parse() or bouncing data to a Web Worker in order to deep clone an object, as there’s now structuredClone() For the longest time, you had to resort to workarounds and libraries to create a deep copy of a JavaScript value. The Platform now ships with structuredClone(), a built-in …

Here’s a PNG that will show a different image in Apple Software

This is wild: while writing his own parallel-decodable PNG implementation, David Buchanan discovered he had a bug in his code. Soon after, he found out Apple has the same bug in their implementation which ships with macOS and iOS. As a result, it’s possible to craft a PNG in such a way that Apple’s decoder …

How to prevent scrolling the page on iOS Safari 15

Rik Schennink: If we show a modal on iOS we need to prevent events inside the modal from interacting with the page behind the modal. On a previous episode of “Fun with Safari” we could use preventDefault() on the touchmove event but on iOS 15 that no longer works. Here we go. The solution lies …

Understanding Rendering in the Jamstack (SSG, ISR, DPR, DSG, …)

Can’t follow there with Jamstack’s SSG, ISR, DPR, DSG abbreviations? And what about Edge Rendering? Brian Rinaldi has a nice post explaining them all, and guiding you when to choose which. static rendering – Use this as your default. deferred rendering – Use this when you have to render a lot of pages. server-side rendering …

React Conf 2021

Last week React Conf 2021 took place, focussing on the upcoming React 18 release. I especially liked these talks, all before the 2:00:00 mark: 15:00 — React 18 Keynote 48:55 — React 18 for app developers (useDeferredValue 🔥) 1:08:03 — Streaming Server Rendering with Suspense 1:26:40 — React Developer Tooling 1:54:12 — React without memo …