Understanding React Concurrency
React v18.0 has broken ground by introducing a long-awaited feature: Concurrency! Unfortunately, despite a deluge of resources explaining how to use it, explanations of how it works are sparse. As it is a low-level feature, it’s not critical to understand React’s idea of concurrency, but it doesn’t hurt!
Practical Guide To Not Blocking The Event Loop
Effective Higher-Order Components
Before the introduction of contexts and hooks in React v16.8, Higher-Order Components (or HOCs for short) were a common sight. Today, it is an under-used pattern. While the concept presents infinite possibilities, practical applications should be limited to transparently adding wrappers or logic.
Skipping Outdated Refs with GitHub Actions
If you use GitHub Actions for deployments in a “push to master, deploy to prod” sort of flow, you’ve likely wanted to avoid deploying conflicting refs. By default, GitHub Actions will want to run a deployment for every commit as soon as you push it. Concurrency groups help, but it requires a bit of creativity to get it running smoothly.
Writing a Recursive Utility Type in TypeScript
Airbnb has an internal GraphQL server called Viaduct. A feature of Viaduct is that for any response it returns, it adds a
__typename for every object which corresponds to the name of its type.
Is it possible to remove them without rewriting the type definition by hand?