TypeScript in React - COMPLETE Tutorial (Crash Course)
ByteGrad ByteGrad
114K subscribers
170,539 views
0

 Published On Sep 4, 2023

Hi, I'm Wesley. I'm a brand ambassador for Kinde. I'll help you master the latest tech here:

👉 NEW React & Next.js Course: https://bytegrad.com/courses/professi...
👉 Professional JavaScript Course: https://bytegrad.com/courses/professi...
👉 Professional CSS Course: https://bytegrad.com/courses/professi...

👉 Discord: all my courses have a private Discord where I actively participate
🔔 Email newsletter (BIG update soon): https://email.bytegrad.com

⏱️ Timestamps:
0:00 JSX to TSX
0:28 Typing variables
1:28 Typing functions
2:55 Typing React components
3:17 React.FC
3:52 Typing props
6:37 Extracting type
7:20 Benefits of TypeScript
7:44 Optional
8:14 Benefits of TypeScript (cont.)
8:35 'any' type
9:14 Type return value of component?
9:38 Union type
10:03 Extracting type
10:45 Typing arrays
11:32 Tuple type
12:21 React.CSSProperties
14:38 Record type
16:01 Typing functions
17:18 Typing children (React.ReactNode)
18:34 React.JSX.Element vs React.ReactNode
19:42 Typing useState setter function
21:01 Default prop values
21:35 Type Alias vs Interface
24:00 ComponentPropsWithoutRef
26:52 ...rest and ...spread
27:49 Intersection (&)
29:03 Interface extends
29:34 Typing event handler functions
31:13 Typing useState hook
34:33 Typing useRef hook
35:29 'as const'
36:55 Omit utility
37:38 'as' Type Assertion
38:31 Generics (EASY!)
42:00 Generics in React
45:10 index.d.ts vs types.ts
45:34 import type
47:05 'unknown' type
48:20 Zod
48:58 ts-reset library
49:28 Third-party types ('@types' / DefinitelyTyped)
50:33 tsconfig.json
52:09 next-env.d.ts

#webdevelopment #programming #coding

show more

Share/Embed