About 46 results
Open links in new tab
  1. React TypeScript Cheatsheets

    React TypeScript Cheatsheets. Cheatsheets for experienced React developers getting started with TypeScript

  2. Hooks | React TypeScript Cheatsheets

    If you are writing a React Hooks library, don't forget that you should also expose your types for users to use. Example React Hooks + TypeScript Libraries: …

  3. Setup | React TypeScript Cheatsheets

    React has documentation for how to start a new React project with some of the most popular frameworks. Here's how to start them with TypeScript: Next.js: npx create-next-app@latest - …

  4. Advanced Cheatsheet | React TypeScript Cheatsheets

    This Advanced Cheatsheet helps show and explain advanced usage of generic types for people writing reusable type utilities/functions/render prop/higher order components and TS+React …

  5. Class Components | React TypeScript Cheatsheets

    Within TypeScript, React.Component is a generic type (aka React.Component<PropType, StateType>), so you want to provide it with (optional) prop and state type parameters:

  6. Useful Patterns by Use Case | React TypeScript Cheatsheets

    Discriminated Unions in TypeScript can also work with hook dependencies in React. The type matched is automatically updated when the corresponding union member based on which a …

  7. Forms and Events | React TypeScript Cheatsheets

    View in the TypeScript Playground. Instead of typing the arguments and return values with React.FormEvent<> and void, you may alternatively apply types to the event handler itself …

  8. Typing Component Props | React TypeScript Cheatsheets

    consider using type for your React Component Props and State, for consistency and because it is more constrained. You can read more about the reasoning behind this rule of thumb in …

  9. Migrating (to TypeScript) Cheatsheet | React TypeScript Cheatsheets

    This Cheatsheet collates advice and utilities from real case studies of teams moving significant codebases from plain JS or Flow over to TypeScript. It makes no attempt to convince people …

  10. Function Components | React TypeScript Cheatsheets

    Before the React 18 type updates, React.FunctionComponent provided an implicit definition of children (see below), which was heavily debated and is one of the reasons React.FC was …

Refresh