10 fresh write-ups from the JavaScript world. Comes out every Friday (or Saturday if I'm overloaded).

1173 subscribed.

Off The Main Thread

We all feel a symptom of that regularly in the form of performance jank and non-interactivity on elements or entire sites. If we give JavaScript lots of jobs and it gets really busy doing them, then it's not doing other things, like, say, handling our event handlers quickly.


WeakSets in Javascript

The weakSet object lets you store weakly held objects in a collection.


A brief look at async-await

The async function declaration defines an asynchronous function, which returns an AsyncFunction object. An asynchronous function is a function which operates asynchronously via the event loop, using an implicit Promise to return its result. But the syntax and structure of your code using async functions is much more like using standard synchronous functions.


The Promise of Christmas

In this article we will look into promises in Javascript. The concept of a real life promise is simple, as may also be the case when we first start using promises. However, as we gain more experience with Javascript, it becomes important to really understand promises.


JavaScript Promises: 9 Questions

Learn about promises & take the quiz!


⭐ TypeScript In 1 Hour: A Video Intro

I've started a new video course recently to help people get started with TypeScript. It gets you through from the very basics of types to advance topics. We'll see how to migrate an existing project to TypeScript, and finally, learn to configure Visual Code for a comfortable and productive workflow. Get started here.


Modeling State with TypeScript

Managing state on the frontend can often be tricky. Beyond perennial issues around keeping the view and model in sync (which modern frameworks can help with greatly) our model can simply have the wrong state in it. However, using TypeScript, we can define our types in such a way as to make those bad states unrepresentable. Let’s look at an example.


Taking Types Too Far

I love Typescript, but it isn’t nearly ambitious enough. It would be vastly improved with an --extremelyStrict flag enforcing that your Typescript code is free of side-effects; that is – no Javascript code is generated at all. Real programmers do all of their computation within the type system. Otherwise, they can’t be sure their program will work in production and should be duly fired.


The Lens Pattern in TypeScript

In this blog post, we will take a look at a pattern that can help us update and extract data from large immutable data structures. As mentioned in a previous blog post, updating immutable data is done by creating an entirely new copy of the data structure with some part of the data with new values.


Typescript method overloading

Method overloading is a familiar concept from traditional programming languages like Java or C#. It allows a class to have multiple methods with the same name if their signature is different. But…

Even Older Issue →