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

1173 subscribed.

If you care about user privacy, do NOT use Facebook JS SDK

Social Login buttons like the ubiquitous Login with Facebook/Google/Twitter/... button is convenient for users as they don't have to go through a lengthy registration process and create yet another username/password. And without a proper password manager (which probably 99% users don't use), they tend to reuse the same password which is bad in terms of security!


Destructuring in JavaScript

Destructuring assignment is one of the most flexible, simplest feature in modern JavaScript. It's a JavaScript expression that makes it possible to unpack values from Arrays, properties from Objects, or even Function params, into distinct variables.


An Approach to JavaScript Object Schema Migration

Recently, I found myself in a position where an application was heavily reliant on a state object. This is fairly typical for single page applications (SPAs) and can pose a challenge when your state object’s schema changes significantly and you have users that have data saved under an old schema.


Video / Promises From Scratch In A Post-Apocalyptic Future

In this installment of Low Level JavaScript we build a Promise implementation from scratch in order to understand exactly how asynchronous abstractions can be built on top of lower level primitives like callbacks.


⭐ TypeScript In 1 Hour: A Video Intro

I've started a new video course to help you with that. We'll walk through some 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 and Vim for a comfortable and productive workflow. Get a 66% discount with this link.


TypeScript Generics for People Who Gave Up on Understanding Generics

Like TypeScript, the Java programming language supports generics. When I was studying Java in college, I was a beginner programmer, and generics felt very difficult to me. So I gave up on understanding generics at the time and used them without knowing what I was doing. I didn’t understand generics until I got a full time job after college.


For the Sake of Your Event Listeners, Use Web Workers

I’ve been tinkering with the Web Worker API lately, and as a result, I’m really feeling the guilt of not looking into this well-supported tool a lot sooner. Modern web applications are seriously upping demands on the browser’s main thread, impacting performance and the ability to deliver smooth user experiences. This tool is just one way to address the challenge.


How to Approach State Management in React, Vue and Angular

How to deal with state in Angular, Vue and React. The same principles apply to all of them. UI Architecture. JavaScript.


Why you should choose useState instead of useReducer

Since the introduction of the React Hooks API, I’ve seen a lot of discussion about useState, useReducer, and when to use one over the other. From these conversations, one would conclude that useState is best suited for simple state with simple update logic and that useReducer is best for complex state shapes with complex update logic.


How Discord achieves native iOS performance with React Native

Early on at Discord, we adopted React Native as soon as it was open sourced to build our iOS app from the core of our React app. Years later, we are still happy with that decision. Our iOS app currently sees many millions of monthly active users, is 99.9% crash free, and holds a 4.8 star rating on the app store. React Native has been instrumental in allowing us to achieve this with a team of only three core iOS engineers!

Even Older Issue →