Aller au contenu principal
Academind
Tous les cours

Cours Academind Pro

React & TypeScript - The Practical Guide

Build type-safe React apps & use TypeScript to enhance your components, state management, Redux & side effects code.

  • 8 sections · 100 leçons
  • 7 h et 21 min au total

À propos de ce cours

You already know React, but the moment your components get more dynamic, things start to feel fragile. Props become guesswork, state updates get harder to reason about, and you only discover “that one bug” when you run the app.

This course shows you how to bring TypeScript into your React workflow in a way that actually helps—especially where React gets tricky: components, state, events, side effects, and more. You’ll start with a structured TypeScript introduction, then apply the concepts directly to real React patterns so the types make your code clearer instead of slowing you down.

By the end, you’ll be able to build React apps with TypeScript confidently, define the right types for complex UI, and keep your codebase type-safe as it grows. You’ll know how to make advanced components flexible without losing safety, and you’ll be ready to use TypeScript in your own future React projects to reduce errors while you code.

Ce que vous allez apprendre

You’ll connect TypeScript’s core concepts to the exact React patterns that tend to break down when apps become more dynamic and state-heavy.

  1. 01

    TypeScript foundations

    Use key TypeScript concepts confidently, even if you’re starting from zero. You’ll be able to model data and intent with types so errors show up while you write code—not later during testing.

  2. 02

    Type-safe React components

    Build React components with correctly typed props and internal logic. You’ll be able to keep components flexible while still getting reliable autocomplete and compile-time checks.

  3. 03

    Dynamic component patterns

    Create dynamic and even polymorphic components in a type-safe way. You’ll be able to define types that scale with complexity instead of turning into any or brittle workarounds.

  4. 04

    Typed state and events

    Manage state and events with React + TypeScript without fighting the type system. You’ll be able to type common event handlers and state updates so refactors don’t silently break behavior.

  5. 05

    Context and reducer typing

    Use TypeScript with React’s Context API and strengthen useReducer() code with well-defined action and state types. You’ll be able to keep shared state predictable across your component tree.

  6. 06

    Effects, fetching, Redux

    Type data fetching and useEffect() flows, and use Redux in a type-safe way for global state. You’ll be able to keep async data and store updates consistent across the app.

Prérequis

  • Basic React knowledge is required (components, JSX, state).

  • No prior TypeScript knowledge is required.

À qui s’adresse ce cours

  • React developers

    You’re building React apps and want fewer runtime surprises as your codebase grows. This course is the next step if you want stronger guarantees without giving up flexibility.

  • Quality-focused teams

    You’re maintaining or contributing to a React codebase where regressions are costly. You want a practical way to make changes safer and catch type-related issues while coding.

  • TypeScript developers

    You already know TypeScript and want to apply it effectively in real React apps. You’re looking for the React-specific patterns where typing matters most—and where it’s easy to get wrong.

Programme

Découvrez la structure et le rythme de ce cours avant de commencer.

  1. 1Introduction6 leçons · 9 min
    1. 01Welcome To The Course!1:26 min
    2. 02Why React & TypeScript?1:56 min
    3. 03About The Course & Course Content1:46 min
    4. 04How To Get The Most Out Of The Course2:59 min
    5. 05Learning Community & Course Resources0:00 min
    6. 06Creating & Using React + TypeScript Projects1:00 min
  2. 2TypeScript Basics & Core Concepts19 leçons · 1 h et 12 min
    1. 01Module Introduction1:13 min
    2. 02TypeScript Setup & Using TypeScript3:01 min
    3. 03Working with Types: Type Inference & Explicit Type Annotations7:46 min
    4. 04Basic Primitive Types1:08 min
    5. 05Invoking The TypeScript Compiler3:13 min
    6. 06Combining Types Union Types (Alternative Types)2:21 min
    7. 07Working with Object Types5:39 min
    8. 08Working with Array Types3:59 min
    9. 09Adding Types to Functions - Parameter & Return Value Types5:04 min
    10. 10Defining Function Types3:28 min
    11. 11Creating Custom Types / Type Aliases3:57 min
    12. 12Defining Object Types with Interfaces3:06 min
    13. 13Interfaces vs Custom Types4:24 min
    14. 14Being Specific With Literal Types4:21 min
    15. 15Merging Types3:05 min
    16. 16Type Guards & Type Narrowing - A Closer Look0:00 min
    17. 17Adding Type Guards3:42 min
    18. 18Making Sense Of Generic Types12:20 min
    19. 19Summary0:35 min
  3. 3Using TypeScript with React - Essentials19 leçons · 1 h et 39 min
    1. 01Module Introduction1:13 min
    2. 02Creating a React + TypeScript Project6:31 min
    3. 03Understanding the Role of tsconfig.json5:04 min
    4. 04Building a First Component & Facing a Missing Type5:47 min
    5. 05Defining Component Props Types4:05 min
    6. 06Storing Props Types as a Custom Type or Interface2:04 min
    7. 07Defining a Type for Props with "children"7:02 min
    8. 08Component Props & The Special "key" Prop0:00 min
    9. 09Another Way Of Typing Components3:18 min
    10. 10Exercise: Creating a Header Component6:11 min
    11. 11Using useState() and TypeScript6:39 min
    12. 12Working with State & Outputting State-based Values5:49 min
    13. 13Another Exercise & Reusing Types Across Files7:31 min
    14. 14Passing Functions as Values - In A Type-Safe Way10:07 min
    15. 15Handling & Typing Events8:00 min
    16. 16Working with Generic Event Types4:24 min
    17. 17Using useRef() with TypeScript8:50 min
    18. 18Handling User Input In A Type-Safe Way5:08 min
    19. 19Summary1:42 min
  4. 4Advanced Component Types - Dynamic Components, Polymorphic Components & More18 leçons · 1 h et 44 min
    1. 01Module Introduction1:31 min
    2. 02Building a More Dynamic & Flexible Component11:08 min
    3. 03Problem: Flexible Components With Required Prop Combinations6:19 min
    4. 04Solution: Building Components with Discriminated Unions6:06 min
    5. 05Onwards To A New Project1:14 min
    6. 06Building a Basic Wrapper Component4:56 min
    7. 07Building Better Wrapper Components with ComponentPropsWithoutRef7:25 min
    8. 08Building a Wrapper Component That Renders Different Elements7:05 min
    9. 09Working with Type Predicates & Facing TypeScript Limitations10:51 min
    10. 10Building a Basic Polymorphic Component5:26 min
    11. 11Building a Better Polymorphic Component with Generics10:06 min
    12. 12Examples: More Component Ideas0:00 min
    13. 13Using forwardRef with TypeScript7:32 min
    14. 14Building Another Wrapper Component (Custom Form Component)3:45 min
    15. 15Sharing Logic with "unknown" & Type Casting10:10 min
    16. 16Exposing Component APIs with useImperativeHandle (with TypeScript)9:58 min
    17. 17Alternative: Avoiding Type Casting with "as"0:00 min
    18. 18Summary0:57 min
  5. 5Advanced Type-Safe State with Context API & useReducer()10 leçons · 47 min
    1. 01The Starting Project1:39 min
    2. 02Module Introduction0:59 min
    3. 03Creating a Context & Fitting Types7:07 min
    4. 04Creating a Type-Safe Provider Component4:40 min
    5. 05Accessing Context Type-Safe With A Custom Hook6:33 min
    6. 06Getting Started with useReducer() & TypeScript3:15 min
    7. 07A Basic Reducer Function & A Basic Action Type6:28 min
    8. 08Changing State via the Reducer Function2:43 min
    9. 09Using Better Action Types5:47 min
    10. 10Wiring Everything Up & Finishing the App7:26 min
  6. 6Side Effects, useEffect() & Data Fetching with TypeScript12 leçons · 56 min
    1. 01Module Introduction0:46 min
    2. 02Creating a First Side Effect4:45 min
    3. 03Using useEffect() with TypeScript4:31 min
    4. 04A Small Bug & Its Solution0:00 min
    5. 05Managing An Interval With Refs & The Effect Cleanup Function8:53 min
    6. 06useEffect() & Its Dependencies5:45 min
    7. 07Onwards to Data Fetching!2:10 min
    8. 08Building a Utility "get" Function with TypeScript7:00 min
    9. 09Fetching & Transforming Data13:27 min
    10. 10Alternative: Using the "zod" Library for Response Data Validation0:00 min
    11. 11Alternative: A Generic "get" Function0:00 min
    12. 12Handling Loading & Error States8:14 min
  7. 7Using Redux with TypeScript12 leçons · 52 min
    1. 01The Starting Project2:58 min
    2. 02Module Introduction1:04 min
    3. 03Redux Setup1:18 min
    4. 04Creating a Redux Store & A First Slice5:17 min
    5. 05Setting a State Type2:40 min
    6. 06A First Reducer & Controlling the Action Payload Type3:28 min
    7. 07Adding Logic To The Reducer6:17 min
    8. 08Providing the Redux Store2:34 min
    9. 09Dispatching Actions & Adjusting the useDispatch Hook8:25 min
    10. 10Creating a Type-Safe useSelector Hook5:15 min
    11. 11Selecting & Transforming Redux Store Data3:36 min
    12. 12Finishing Touches & Summary9:00 min
  8. 8Practice Project: A "Book a Session" Management Application4 leçons · 2 min
    1. 01Your Task2:03 min
    2. 02Your Task - Details0:00 min
    3. 03Hints0:00 min
    4. 04An Example Solution0:00 min

Prêt à commencer ?

Achetez ce cours sur Academind Pro, ou obtenez tous les cours avec All Access sur Academind Infinite.

Black Friday : un an d’All Access pour 249 $US 249 $US · seulement jusqu’au Profitez de l’offre
  • Ce cours sur Academind Pro

    89 $USpaiement unique

    TVA incluse · Satisfait ou remboursé pendant 30 jours

    • Accès à vie à ce cours
    • Toutes les futures mises à jour de ce cours
    • Ressources téléchargeables, code et un certificat
    Acheter React & TypeScript
  • All Access sur Academind Infinite

    25 $USpar mois

    ou 249 $US 249 $US par anÉconomisez 17 %

    • Tous les cours, avec toutes leurs fonctionnalités
    • Les nouveaux cours dès leur sortie
    • Votre tuteur, avec toutes ses fonctionnalités
    Obtenir All Access

All Access inclut aussi tous les cours Academind Pro.

Academind Pro et Academind Infinite

Deux plateformes distinctes, chacune avec ses propres cours et sa propre connexion.

Academind Pro

Notre plateforme de cours d’origine, sur pro.academind.com. Votre abonnement Pro et les cours que vous y avez achetés restent sur Pro.

Se connecter à Academind Pro

Academind Infinite

Notre nouvelle plateforme pensée pour l’IA. Les membres Pro se connectent avec leur compte Pro, et l’offre Pro All Access inclut Infinite : tous les cours leur sont ouverts.

Se connecter à Academind Infinite

Vous aviez un compte Pro ou avez acheté un cours sur Pro ?

Tous les cours Pro ne sont pas passés sur Infinite, seulement ceux-ci. Choisissez le vôtre pour le voir sur Infinite.