|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/custom-react-hooks-crash-course/
课程评论:没有评论
**课程名称:** Custom React Hooks Crash Course: Learn Hooks Through 6 Apps **课程概述:** 本课程旨在通过构建6个小型应用程序,深入学习和实践React中常用的自定义Hooks模式。学员将学习如何将常用的通用工具函数、数据抓取、业务逻辑等可复用代码封装成自定义Hooks,从而提高代码的可维护性和复用性。 **课程亮点:** * **实践驱动:** 课程采用6个独立的应用程序作为载体,让学员在实际编码中掌握自定义Hooks的应用。 * **循序渐进:** 从基础概念(如计数器应用)到高级模式(如Context API、测试),逐步引导学员深入理解。 * **技术栈:** 使用Create React App作为起始环境,结合React 18和TypeScript进行教学。 * **内容涵盖:** * 自定义Hooks入门 (Counter app) * 自定义Hooks结构 (Toggle component) * 自定义Hooks的生命周期 (Weather dashboard) * 通过自定义Hooks共享逻辑 (useForm hook + localStorage) * 结合Context API的自定义Hooks (Theme Switcher) * 高级模式与最佳实践 (Todo app) * 自定义Hooks测试 (Counter app tests) * **适用范围广:** 课程教授的Hooks模式可广泛应用于任何React项目,无论项目如何创建。 * **实际操作:** 鼓励学员边学边练,通过编写代码来巩固所学知识。 **学习目标:** 通过本课程的学习,学员能够: * 理解自定义Hooks的核心概念和优势。 * 掌握封装可复用逻辑到自定义Hooks的方法。 * 识别和应用不同场景下的自定义Hooks模式。 * 提高React应用的开发效率和代码质量。 **配套资源:** 课程提供的所有示例应用代码已打包在“custom-react-hooks-course Zip”文件中,可在第一讲“Introduction”中获取。
In this course, through 6 small applications, we'll recreate hooks and patterns that are commonly used in production web applications.We'll learn how to encapsulate generic utility functions, fetches, business logic, or any code we want to reuse in Custom Hooks.We'll use create-react-app as the starting port for every application, React 18 and TypeScript.The lectures will cover:Introduction to Custom Hooks (Counter app)Structure of a Custom Hook (Toggle component)Lifecycle in Custom Hooks (Weather dashboard)Sharing Logic with Custom Hooks (useForm hook + localStorage)Custom Hooks with Context API (Theme Switcher)Advanced Patterns and Best Practices (Todo app)Testing Custom Hooks (Counter app tests)This course aims to show you different types of Custom React Hooks in various scenarios so you can learn, recognize, and apply these patterns to your application.Working Through This CourseEvery example app is built with Create React App. This was the easiest way for me to create React apps I can work with that don't have any unnecessary clutter, but these patterns can be applied in any React application, no matter how they are created.This course is broken down into lectures and in each lecture you'll build a different app, and in some you'll even reuse some of the hooks you created earlier. The course is a practical, hands-on approach to learning through practice. You learn best when you code along with the examples.ResourcesAll example apps are in custom-react-hooks-course Zip, In Lecture 1. > Introduction.