All In Developer Logo

all1n.dev

❤️  All In Developer

  • 🐳 Slimming a production Strapi 5 Docker image from 3.2 GB to 867 MB

    10/4/2026

    Most of a production Strapi image is the admin panel's build toolchain and frontend libraries, which the server never loads once the panel is built. Deploy only the app, override away webpack, and delete the rest from the deploy output.

  • 🎯 Overloading on a branded type

    9/25/2026

    An overload set can hand the branded argument a precise return type and the unbranded one a nullable type, so callers that already did the parse stop handling a failure that cannot happen to them.

  • ⚖️ When to use branded types, and when not to

    9/25/2026

    Branding pays off for the Invalid Date hole, sanitization state, money, ids and validated values. It is noise inside a single module, on types that are already distinct, and on anything mutable.

  • 🏷️ Branded types in TypeScript

    9/25/2026

    TypeScript compares types by shape, so a user id and a post id are both just a string and swapping them compiles. A brand makes them distinct at compile time and leaves nothing behind at runtime.

  • 🧩 Import ESM-only types from a CommonJS TypeScript project

    9/3/2026

    A CommonJS file resolves an ESM-only package through the require condition, so its types come back missing. The resolution-mode import attribute overrides that for a single import.

  • 🩹 Migrate from patch-package to pnpm patch

    6/17/2026

    A few simple steps to migrate your existing patch-package patches to pnpm patch. You can even batch...

  • 🧶 Implicit CLSX in React

    12/1/2021

    Using clsx or classnames in React lately has become a trend with utility-first CSS frameworks like...

  • ☢️ HTML Comment in React

    11/25/2021

    If you ever started learning React and saw it's syntax JSX, you maybe thought. "This looks like...

  • 🎄 Render in Vue, 16+ ways

    11/19/2021

    In this blog post I will show you 16 ways how to render something in Vue 🚀 So let's...

  • 🥑 Put your React on a diet

    10/22/2021

    For a long time I heard people complaining that React & ReactDOM has a huge size, and everyone...

  • 🗜️ Optimal Tuple vs Record

    10/13/2021

    Let's say we have this createStore function: Ignore the implementation, we focus only on return...

  • 🧬 JSX at lowest level

    10/7/2021

    this post is a precursor for upcoming JSX posts So we all heard that JSX is a specific JavaScript...

  • ↪️ Next.js, Universal and Nuxt.js static redirects

    10/4/2021

    Frameworks like Next.js (React 💙), Nuxt.js (Vue 💚) and Universal (Angular ❤️) allow you to register...

  • 🍂 Remove gone git branches

    9/30/2021

    Alias for removing local branches that are gone on remote # ~/.gitconfig file [alias] ...

  • 🔍 Bookmarklets + Browser Search Engine

    9/28/2021

    This post may be relevant mostly to developers or who loves automation. The Post covers two topics,...

  • 🔺 Flat React Doom Pyramid in 1LOC

    9/22/2021

    Everyone was happy when React Team announced the new stable Context API, and everyone ditched Redux....

  • 🔐 Private Route in React Router v6

    9/21/2021

    Things are changing fast in WEB today, and react-router v6 is in beta already and around the corner....

  • 🔧 Git remote readd alias

    7/13/2021

    Alias for removing Git remote and adding it back git config --global alias.readd '!f() {...

  • 🚧 Configure MSW in NX

    6/22/2020

    Mock Service Worker (MSW) is an API mocking library for browser and Node. —...

  • 🐏 How React memoization works

    3/31/2020

    How to memoize your children to not trigger a re-render

  • 🔥 How to merge a pull request

    3/3/2020

    Rules to take into consideration when merging a pull request

  • 🗂️ What is the folder structure of project/library working on?

    9/26/2019

    Follow Angular style guide https://angular.io/guide/styleguide tree -I 'node_modules|build' ...

  • 🦥 React.lazy without a default export

    5/24/2019

    React v16.6.0 introduced React.lazy that allows to code split without any external...

  • 🔀 TypeScript function overloading

    3/28/2019

    One implementation, several call signatures. How to write them for functions, methods, constructors and statics, and the three rules that decide which signature a call actually gets.

  • 🔗 Don't return early from React.Component when using React.createRef

    12/3/2018

    Add note for early return when using ref #1456 ...

  • 💪🏼 Typed fetch Response in TypeScript

    11/23/2018

    Currently TypeScript lib.dom.d.ts does not implement Typed fetch...

  • 🗄️ Create own React.Fragment

    8/16/2018

    Implement own `React.Fragment`

  • ♻️ Override DOM input typed character

    7/17/2018

    Problem trying to solve. Map every keyboard (input source / layout) back to EN-US. Why...

  • 🪆 Nesting and overriding new React Context API

    7/6/2018

    While learning react-router v4 I read some of their source code. And as we know they are using...