finds.dev← search

// the find

typescript-cheatsheets/react

★ 47,066 · TypeScript · MIT · updated May 2026

Cheatsheets for experienced React developers getting started with TypeScript

A reference guide for React developers who know TypeScript basics but need concrete patterns for typing hooks, components, refs, and events. Not a tutorial — it assumes you already know React and just need the type signatures. The web docs (Docusaurus site) are more complete than the README.

Covers the genuinely tricky cases that trip people up: useRef's two distinct modes (DOM ref vs mutable value), useReducer with discriminated unions, custom hooks returning tuples (as const), and the useCallback typing change between React 17 and 18. The types/interfaces comparison table is honest and practical rather than dogmatic. Updated for React 19's forwardRef removal — defaultProps on function components is correctly marked dead.

Class component coverage is disproportionately large for 2026 — getDerivedStateFromProps gets three full patterns when most codebases have migrated off it. The concurrent React / Suspense section is a stub labeled 'concurrent' with nothing useful in it. No coverage of React Server Components or the newer use() hook, which is a real gap for anyone on Next.js 13+. The README is auto-generated from markdown partials via genReadme.mjs, so the source of truth is scattered across docs/ — contributing requires understanding that indirection.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →