✳flâneur — a map of the web's best reading
Typing Component Props | React TypeScript Cheatsheets
react-typescript-cheatsheet.netlify.app · 1,094 words · saved by 1 readers
This is intended as a basic orientation and reference for React developers familiarizing with TypeScript.
On this page This is intended as a basic orientation and reference for React developers familiarizing with TypeScript. Basic Prop Types Examples A list of TypeScript types you will likely use in a React+TypeScript app: type AppProps = { message : string ; count : number ; disabled : boolean ; /** array of a type! */ names : string [ ] ; /** string literals to specify exact string values, with a union type to join them together */ status : "waiting" | "success" ; /** an object with known properties (but could have more at runtime) */ obj : { id : string ; title : string ; } ; /** array of obj
Explore this link on the map →related reading
- Function Components | React TypeScript Cheatsheetreact-typescript-cheatsheet.netlify.app
- Tutorial: Tic-Tac-Toe – Reactreactjs.org
- TypeScript: Documentation - Object Typestypescriptlang.org
- Typescript utility types that you must know - DEV Communitydev.to
- TypeScript: Documentation - The Basicstypescriptlang.org
- How Props Work in React – A Beginner's Guidefreecodecamp.org
- reactjs - How to handle Types in React and Express App? - Stack Overflowstackoverflow.com
- React graph viscrubier.github.io
- TypeScript: Documentation - TypeScript 3.7typescriptlang.org
- True Leisure and the Tyranny of Total Workevery.to
- Why Generalists Own the Futureevery.to
- Against Explanationsevery.to