Issue #318 · March 27, 2023

TypeScript 5.0

“You cannot endow even the best machine with initiative; the jolliest steamroller will not plant flowers”

TypeScript 5.0

TypeScript 5.0

A new major version of TypeScript is here! This version brings many new exciting features such as decorators, const type parameters, enums improvements, exhaustive switch/case completions, and more! check out the full release post if you are curious to find out more and to learn how to update your projects to start using this new version.

Articles

You Might Not Need an Effect

In React, useEffect allows synchronization between components and external systems like non-React widgets, networks, or the browser DOM. However, if there is no external system involved, unnecessary usage of useEffect can make code harder to follow, slower to run, and more prone to errors. This page from the new React documentation shows us how to spot and remove unnecessary usage of useEffect!

Modern Font Stacks

Modern Font Stacks is a collection of CSS system font stacks organized by typeface classification for every modern OS. Using system font stacks is the fastest way to load fonts on a web page because there's no external resource to be loaded which, in turn, helps us to avoid annoying flashes or layout shifts. So pick your favorite system font stack combination from here for your next web project!

Ten tips for better CSS transitions and animations

Have you ever found yourself using an app or visiting a website and just knowing that something about the user interface feels off? Maybe you can't quite put your finger on it, but you can feel it in your bones - it just doesn't flow as smoothly as it should. This is where the magic of well-crafted transitions and animations comes in.

Document Object Model (DOM) Geometry

Are you tired of bland user interfaces that fail to captivate your audience? Look no further! In this guide, Pearl Akpan delves into the exciting world of user interface solutions that will take your website to the next level. From infinite scrolling to animating elements on scroll and drag and drop, these interfaces have been around for a while and continue to captivate users worldwide.

React hook to detect component mount, unmount & re-renders.

One of the most challenging things with modern component-based frontend frameworks is to understand when a component actually re-renders (and why). This React hook could help you to do just that to make sure you use React correctly. The best part is that the hook only works in dev mode so it's not going to affect your users in any negative way!

Book of the week

Build APIs You Won't Hate: Everyone and their dog wants an API, so you should probably learn how to build them

Build APIs You Won't Hate: Everyone and their dog wants an API, so you should probably learn how to build them

by Phil Sturgeon

API development is becoming increasingly common for server-side developers thanks to the rise of front-end JavaScript frameworks, iPhone applications, and API-centric architectures. It might seem like grabbing stuff from a data source and shoving it out as JSON would be easy, but surviving changes in business logic, database schema updates, new features, or deprecated endpoints can be a nightmare. After finding many of the existing resources for API development to be lacking, Phil learned a lot of things the hard way through years of trial and error. This book aims to condense that experience, taking examples and explanations further than the trivial apples and pears nonsense tutorials often provide. By passing on some best practices and general good advice you can hit the ground running with API development, combined with some horror stories and how they were overcome/avoided/averted.