Video Belajar
Tonton dan pelajari berbagai topik menarik melalui video pembelajaran eksklusif dari Channel Dave Gray.
Dave Gray
20153
Learn useReducer with Typescript + React Hooks
Web Dev Roadmap for Beginners (Free!): https://bit.ly/DaveGrayWebDevRoadmap
Learn useReducer with Typescript + React Hooks in this React + TS tutorial. useReducer is a replacement for the useState React hook, and is often used with more complex state. Learn how to provide types for a reducer function, actions, and more.
π Become a full-stack web dev with Zero To Mastery Courses:
- The Complete Web Developer: https://bit.ly/WebDevMaster
- Master the Coding Interview: https://bit.ly/FAANGInterview
- Junior to Senior Dev Roadmap: https://bit.ly/WebDevRoadmap-JrtoSr
π© Subscribe β https://bit.ly/3nGHmNn
π¬ Course Updates β https://courses.davegray.codes/
β Questions - Please post them to my Discord β https://discord.gg/neKghyefqh
β Buy Me A Coffee β https://www.buymeacoffee.com/davegray
π Follow Me On Social Media:
Github: https://github.com/gitdagray
Twitter: https://twitter.com/yesdavidgray
LinkedIn: https://www.linkedin.com/in/davidagray/
π All Resources for this Typescript Course: https://github.com/gitdagray/typescript-course
π Playlist for this Typescript Course: http://bit.ly/3GcNJ78
Learn useReducer with Typescript + React
(00:00) Intro
(00:08) Welcome
(00:30) Starter Code Review
(02:45) What is useReducer?
(03:30) Define initial state
(03:51) Reducer Action Type: enum or object?
(04:58) type ReducerAction
(05:37) reducer function
(08:38) Refactoring from useState to useReducer
(11:18) Adding a Payload
π Suggested Pre-requisites for this Typescript course:
πJavaScript for Beginners full course: https://youtu.be/EfAl9bwzVZk
π React Hooks tutorials:
π useState: https://youtu.be/yvTGXH7uybA
π useEffect: https://youtu.be/j3vk0FW71DM
π useCallback: https://youtu.be/FB_kOSHk1DM
π useMemo: https://youtu.be/oR8gUi1LfWY
π useRef: https://youtu.be/s6UAuFzL308
π useReducer: https://youtu.be/26ogBZXeBwc
π Tutorial References:
π TypeScript + React Cheatsheet: https://github.com/typescript-cheatsheets/react
π React Official Website: https://reactjs.org/
π Typescript Official Website: https://www.typescriptlang.org/
π Anders Hejlsberg, Creator of Typescript and C# Interview: https://dev.to/destrodevshow/typescript-and-c-both-created-by-the-same-person-named-anders-hejlsberg-42g4
π Stackoverflow Survey Results: https://survey.stackoverflow.co/2022/#technology-most-popular-technologies
π MDN - Static Typing: https://developer.mozilla.org/en-US/docs/Glossary/Static_typing
π MDN - Dynamic Typing: https://developer.mozilla.org/en-US/docs/Glossary/Dynamic_typing
π MDN - Type Coercion: https://developer.mozilla.org/en-US/docs/Glossary/Type_coercion
π TS Type Assertions: https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#type-assertions
β Web Dev Tools:
π Vite: https://vitejs.dev/
π Chrome Browser: https://www.google.com/chrome/
π Visual Studio Code (VS Code): https://code.visualstudio.com/
π Node.js & npm: https://nodejs.org/
π Live Server VS Code Extension: https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer
Was this React Hooks + Typescript useReducer tutorial helpful? If so, please share. Let me know your thoughts in the comments.
#usereducer #react #typescript
Learn useReducer with Typescript + React Hooks in this React + TS tutorial. useReducer is a replacement for the useState React hook, and is often used with more complex state. Learn how to provide types for a reducer function, actions, and more.
π Become a full-stack web dev with Zero To Mastery Courses:
- The Complete Web Developer: https://bit.ly/WebDevMaster
- Master the Coding Interview: https://bit.ly/FAANGInterview
- Junior to Senior Dev Roadmap: https://bit.ly/WebDevRoadmap-JrtoSr
π© Subscribe β https://bit.ly/3nGHmNn
π¬ Course Updates β https://courses.davegray.codes/
β Questions - Please post them to my Discord β https://discord.gg/neKghyefqh
β Buy Me A Coffee β https://www.buymeacoffee.com/davegray
π Follow Me On Social Media:
Github: https://github.com/gitdagray
Twitter: https://twitter.com/yesdavidgray
LinkedIn: https://www.linkedin.com/in/davidagray/
π All Resources for this Typescript Course: https://github.com/gitdagray/typescript-course
π Playlist for this Typescript Course: http://bit.ly/3GcNJ78
Learn useReducer with Typescript + React
(00:00) Intro
(00:08) Welcome
(00:30) Starter Code Review
(02:45) What is useReducer?
(03:30) Define initial state
(03:51) Reducer Action Type: enum or object?
(04:58) type ReducerAction
(05:37) reducer function
(08:38) Refactoring from useState to useReducer
(11:18) Adding a Payload
π Suggested Pre-requisites for this Typescript course:
πJavaScript for Beginners full course: https://youtu.be/EfAl9bwzVZk
π React Hooks tutorials:
π useState: https://youtu.be/yvTGXH7uybA
π useEffect: https://youtu.be/j3vk0FW71DM
π useCallback: https://youtu.be/FB_kOSHk1DM
π useMemo: https://youtu.be/oR8gUi1LfWY
π useRef: https://youtu.be/s6UAuFzL308
π useReducer: https://youtu.be/26ogBZXeBwc
π Tutorial References:
π TypeScript + React Cheatsheet: https://github.com/typescript-cheatsheets/react
π React Official Website: https://reactjs.org/
π Typescript Official Website: https://www.typescriptlang.org/
π Anders Hejlsberg, Creator of Typescript and C# Interview: https://dev.to/destrodevshow/typescript-and-c-both-created-by-the-same-person-named-anders-hejlsberg-42g4
π Stackoverflow Survey Results: https://survey.stackoverflow.co/2022/#technology-most-popular-technologies
π MDN - Static Typing: https://developer.mozilla.org/en-US/docs/Glossary/Static_typing
π MDN - Dynamic Typing: https://developer.mozilla.org/en-US/docs/Glossary/Dynamic_typing
π MDN - Type Coercion: https://developer.mozilla.org/en-US/docs/Glossary/Type_coercion
π TS Type Assertions: https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#type-assertions
β Web Dev Tools:
π Vite: https://vitejs.dev/
π Chrome Browser: https://www.google.com/chrome/
π Visual Studio Code (VS Code): https://code.visualstudio.com/
π Node.js & npm: https://nodejs.org/
π Live Server VS Code Extension: https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer
Was this React Hooks + Typescript useReducer tutorial helpful? If so, please share. Let me know your thoughts in the comments.
#usereducer #react #typescript