React & TypeScript - The Practical Guide
Build type-safe React apps & use TypeScript to enhance your components, state management, Redux & side effects code.
Build type-safe React apps & use TypeScript to enhance your components, state management, Redux & side effects code.
TypeScript is an amazing technology that helps developers write better code with less errors - simply because it let's you catch & fix type-related errors immediately whilst writing the code (instead of when testing the application).
But using TypeScript with React can sometimes be tricky. Especially when building more complex, dynamic components, defining the right types can be challenging.
That's why I built this course!
This course will teach you how to use TypeScript with React - and, of course, the course will introduce you to all the core concepts & patterns you need to work with components, state, side effects & more in a type-safe way!
This course will:
Teach you WHY using TypeScript in your React projects might be a good idea
Introduce you to the key TypeScript concepts you'll need - when working with React & in general
Get you started with using TypeScript with React - for components, state & more
Explore more advanced, complex patterns & examples
Help you with building dynamic or even polymorphic components in a type-safe way
Teach you how to use TypeScript with React's Context API
Explore how you can enhance code used with useReducer() with help of TypeScript
Cover data fetching & useEffect() with TypeScript
Use the popular Redux library in a type-safe way
Build or improve multiple demo projects so that can apply your knowledge
By the end of the course, you'll be able to use TypeScript in your own (future) React projects and write better, more type-safe code.
Course prerequisites:
NO prior TypeScript knowledge is required - though basic knowledge will help (but the course includes an introduction module)
Basic React knowledge (components, JSX, state) IS required - more advanced concepts will be explained though
FAQ area empty
Module Introduction
Xem trướcTypeScript Setup & Using TypeScript
Xem trướcWorking with Types: Type Inference & Explicit Type Annotations
Xem trướcBasic Primitive Types
Xem trướcInvoking The TypeScript Compiler
Xem trướcCombining Types Union Types (Alternative Types)
Xem trướcWorking with Object Types
Xem trướcWorking with Array Types
Xem trướcAdding Types to Functions - Parameter & Return Value Types
Xem trướcDefining Function Types
Xem trướcCreating Custom Types / Type Aliases
Xem trướcDefining Object Types with Interfaces
Xem trướcInterfaces vs Custom Types
Xem trướcMerging Types
Xem trướcBeing Specific With Literal Types
Xem trướcAdding Type Guards
Xem trướcType Guards & Type Narrowing - A Closer Look
Making Sense Of Generic Types
Xem trướcSummary
Xem trướcModule Introduction
Xem trướcCreating a React + TypeScript Project
Xem trướcUnderstanding the Role of tsconfig.json
Xem trướcBuilding a First Component & Facing a Missing Type
Xem trướcDefining Component Props Types
Xem trướcStoring Props Types as a Custom Type or Interface
Xem trướcDefining a Type for Props with "children"
Xem trướcComponent Props & The Special "key" Prop
Another Way Of Typing Components
Xem trướcExercise: Creating a Header Component
Xem trướcUsing useState() and TypeScript
Xem trướcWorking with State & Outputting State-based Values
Xem trướcAnother Exercise & Reusing Types Across Files
Xem trướcPassing Functions as Values - In A Type-Safe Way
Xem trướcHandling & Typing Events
Xem trướcWorking with Generic Event Types
Xem trướcUsing useRef() with TypeScript
Xem trướcHandling User Input In A Type-Safe Way
Xem trướcSummary
Xem trướcModule Introduction
Xem trướcBuilding a More Dynamic & Flexible Component
Xem trướcProblem: Flexible Components With Required Prop Combinations
Xem trướcSolution: Building Components with Discriminated Unions
Xem trướcOnwards To A New Project
Xem trướcBuilding a Basic Wrapper Component
Xem trướcBuilding Better Wrapper Components with ComponentPropsWithoutRef
Xem trướcBuilding a Wrapper Component That Renders Different Elements
Xem trướcWorking with Type Predicates & Facing TypeScript Limitations
Xem trướcBuilding a Basic Polymorphic Component
Xem trướcBuilding a Better Polymorphic Component with Generics
Xem trướcExamples: More Component Ideas
Using forwardRef with TypeScript
Xem trướcBuilding Another Wrapper Component (Custom Form Component)
Xem trướcSharing Logic with "unknown" & Type Casting
Xem trướcExposing Component APIs with useImperativeHandle (with TypeScript)
Xem trướcAlternative: Avoiding Type Casting with "as"
Summary
Xem trướcModule Introduction
Xem trướcThe Starting Project
Xem trướcCreating a Context & Fitting Types
Xem trướcCreating a Type-Safe Provider Component
Xem trướcAccessing Context Type-Safe With A Custom Hook
Xem trướcGetting Started with useReducer() & TypeScript
Xem trướcA Basic Reducer Function & A Basic Action Type
Xem trướcChanging State via the Reducer Function
Xem trướcUsing Better Action Types
Xem trướcWiring Everything Up & Finishing the App
Xem trướcModule Introduction
Xem trướcCreating a First Side Effect
Xem trướcUsing useEffect() with TypeScript
Xem trướcManaging An Interval With Refs & The Effect Cleanup Function
Xem trướcUseEffect() & Its Dependencies
Xem trướcA Small Bug & Its Solution
Onwards to Data Fetching!
Xem trướcBuilding a Utility "get" Function with TypeScript
Xem trướcFetching & Transforming Data
Xem trướcAlternative: Using the "zod" Library for Response Data Validation
Alternative: A Generic "get" Function
Handling Loading & Error States
Xem trướcModule Introduction
Xem trướcThe Starting Project
Xem trướcRedux Setup
Xem trướcCreating a Redux Store & A First Slice
Xem trướcSetting a State Type
Xem trướcA First Reducer & Controlling the Action Payload Type
Xem trướcAdding Logic To The Reducer
Xem trướcProviding the Redux Store
Xem trướcDispatching Actions & Adjusting the useDispatch Hook
Xem trướcCreating a Type-Safe useSelector Hook
Xem trướcSelecting & Transforming Redux Store Data
Xem trướcFinishing Touches & Summary
Xem trướcBasic React knowledge of core concepts (components, JSX, state) is needed
NO prior TypeScript knowledge is required
Learn how to build React apps with TypeScript
Get a structured introduction to TypeScript
Use both basic & advanced TypeScript concepts
Build dynamic & highly flexible components with React & TypeScript
Build advanced & highly dynamic components in a type-safe way
Use TypeScript with React's Context API & useReducer() Hook
Manage state and events with React and TypeScript
Use TypeScript with Redux for type-safe global state management
1.2
1 Student
307 Courses
1253 Reviews
Xin chào các bạn, tôi là Nguyễn Đình Cường, một lập trình viên và giảng viên đam mê công nghệ với hơn 15 năm kinh nghiệm trong ngành công nghiệp phần mềm. Tôi tốt nghiệp từ Bưu Chính Viễn Thông và đã từng làm việc cho một số công ty công nghệ hàng đầu như FPT Software và VinGroup. Với chuyên môn chính là phát triển ứng dụng web, tôi đã làm việc với nhiều công nghệ như HTML, CSS, JavaScript, React cho front-end và Node.js, Express, MongoDB cho back-end. Không chỉ dừng lại ở việc viết mã, tôi còn yêu thích tìm hiểu sâu về thiết kế hệ thống và kiến trúc phần mềm. Tôi tin rằng quá trình học lập trình không chỉ đơn thuần là lý thuyết, mà còn là sự trải nghiệm thực tế và giải quyết vấn đề. Trong các khóa học của mình, tôi cố gắng cung cấp cho học viên những bài giảng thú vị và dễ hiểu, cùng với các bài tập thực hành giúp củng cố kiến thức. Tôi hy vọng rằng qua các khóa học của mình, bạn sẽ không chỉ học được cách viết mã, mà còn phát triển tư duy lập trình và kỹ năng giải quyết vấn đề. Hãy cùng nhau khám phá thế giới lập trình và biến ý tưởng của bạn thành hiện thực! Nếu bạn có bất kỳ câu hỏi nào, đừng ngần ngại liên hệ với tôi. Tôi rất vui được hỗ trợ bạn trong hành trình học tập của mình!
View Details