Lupleg Logo
All Tutorials

Beginner's TypeScript

Mark SikaundiMark Sikaundi

TypeScript's features and developer experience make a great combination with React, but it can be confusing to get started.

What's the best way to type component props? What are these weird useRef errors?

That's where this React with TypeScript tutorial comes in!

Starting from the very beginning of bringing TS support to a React project, you'll soon find yourself properly typing hooks and mastering components. You'll learn everything you need to know to get productive with React and TypeScript.

Tutorial topics include:

  • Reading React's type definitions to debug errors and ensure correct usage
  • Defining props for custom and React.FC function components
  • Putting TypeScript's inference to work for you
  • Supporting component children
  • Typing and overriding event handlers
  • Utilizing ComponentProps to extract properties from imported components or HTML DOM elements
  • Utilizing ComponentProps to extract properties from imported components or HTML DOM elements
  • Understanding the APIs and typing for useState, useCallback, useEffect, and other React Hooks. By the end of this workshop, you'll be confident when using React with TypeScript in your own projects!

Contents3 Sections

Introduction

1. Adding React to a TypeScript Project

2. TypeScript in React Frameworks

3. Navigating JSX Types

Components
Hooks

Coming soon

Complete all lessons to unlock this certificate.