I’m creating a reusable React component library in TypeScript for a client


I’m creating a reusable React component library in TypeScript for a client. It’s taking longer than a plain JS library.

That’s not surprising. TypeScript is a tradeoff.

⏰ Invest time up front in declaring types
🏎 Move faster later (via compile-time checks, autocomplete)
Every consumer of this library will be able to move faster because with TypeScript, they'll be notified sooner when they make a mistake.

In general, the compiler will assure that impossible state are impossible. 👍

View original on X