正在加载视频...

视频加载失败

⚛️ How to use discriminated unions in TypeScript to represent mutually exclusive states in React↓

28,192 次观看 • 1 年前 •via X (Twitter)

9 条评论

George Moller 的头像
George Moller1 年前

I've been working professionally with React for more than 8 years and I compiled all my knowledge into 100+ infographics and 77 video tutorials just like this one. Check them out ↓

Ndeye Fatou Diop 🚢 💻 | DEV | 🇸🇳🇫🇷 的头像
Ndeye Fatou Diop 🚢 💻 | DEV | 🇸🇳🇫🇷1 年前

This is the best way to represent loading data and the one I use. Unfortunately I often see this representation type Response<T, E> = { isPending: Boolean, error: T | null, data: T} which can represent invalid states

George Moller 的头像
George Moller1 年前

Glad you liked it :)

David K 🎹 的头像
David K 🎹1 年前

This is nice!

Daan 的头像
Daan1 年前

Really like your new video style! Can you point out a good Typescript course?

Wk - Kevin 的头像
Wk - Kevin1 年前

I have another one, its called “react-query”

kmylo 的头像
kmylo1 年前

shouldn't be better an enum or even better an obj as const? instead of work with literal strings?

Youry 的头像
Youry1 年前

@_georgemoller thanks for sharing it! Just wondering what tool do you use to record the videos? They are really good 👍

Casey Key 的头像
Casey Key1 年前

How did your create this animation?

相关视频