finds.dev

typescript-cheatsheets/react

Cheatsheets for experienced React developers getting started with TypeScript

View on GitHubHomepage ↗

★ 47,066TypeScriptMITupdated May 2026

// the take

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.

We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
47,066
Forks
4,292
Language
TypeScript
License
MIT
Last commit
29 May 2026

// nearby

If react isn't quite it.

All repos →