Using React 17 Hooks
React Hooks bring state and lifecycle events to React Functional Components as well as streamlining code that previously was coupled and complex. Learn techniques for using React Hooks including Redux-like state management with React Context.
What you'll learn
React Hooks reduce the complexity associated with managing state and lifecycle events exclusively in React Functional Components. What previously was complex, and often required middleware to implement, can be easily done and extended using React Hooks. They are called “hooks” because they allow the developer to hook into existing pre-built functionality. In this course, Using React 17 Hooks, you'll gain the ability to consume pre-built React Hooks, as well as author your own custom React Hooks. First, you’ll learn all about the six most commonly used React Hooks that are built into the React core library. Then, you’ll see how they compare to the corresponding state and lifecycle events in more traditional legacy React Class Components. Next, you’ll explore how to both consume and author your own re-usable custom React Hooks. Finally, you’ll be shown how to combine React Context with React Hooks state management to integrate a Redux-like state management solution into your React app. When you are finished with this course, you’ll confidently be able to build fully capable functional components that use React Hooks.
Table of contents
- Version Check 0m
- Learn How React Hooks Makes React Better with a Simple Example 4m
- Setting up Our React Tool Chain 6m
- Our First React Hook setState, and Tracking Input Field Value 6m
- Using useRef to Enable Mouseover to Colorize an Image 6m
- Learning How to Use the useEffect Hook 5m
- Using useEffect, useRef and useState for Colorizing on Scroll 6m
- Improving and Fixing Our Scrolling Colorizing React App 3m
- Adding a Side Effect to Our Scroller Component 5m
- Optimizing Performance with the useEffect Dependency Array 2m
- Takeaways 1m
- Why Should You Use React Hooks and Does It Matter? 3m
- React Hooks Basic Usage and Rules 4m
- Updating Our Examples to a Real-world Conference React App 8m
- Building out the Conference Speakers Page with Our Primitive React Hooks 7m
- Preparing React Context for Use with useContext Hook 4m
- Using useContext to Access Global Configuration from React Context API 2m
- useReducer Is What useState Is Built On 4m
- Using useReducer with Multiple Dispatched Actions 6m
- Using useCallback to Improve React App Performance 3m
- Using useMemo to Optimize Filtering and Sorting Speakers 3m
- Takeaways 1m
- What’s Different and What’s the Same between Hooks and No Hooks 2m
- Tracking State Changes in React Hooks Functional Components vs. React Class Components 3m
- What useState Represents in a Class Component 3m
- What useRef Represents in a Class Component 1m
- What useEffect Represents in a Class Component 6m
- Takeaways 1m
- Benefits of Combing React Hooks into Custom Hooks 2m
- Timing out and Email Validation on the Signup Form 6m
- Combining Multiple React Hooks into One Custom Hook 3m
- Updating Our Speakers Component to Handle Multiple State Values Using Destructuring 6m
- Creating a Custom React Hook to Manage Speaker Data and Loading 3m
- Extending Our Custom React Hook with Update Functionality 5m
- The Basics of Using a REST Service as Our Speaker Data Source 4m
- Converting Our Custom React Hook to Use REST Instead of a Static Array 6m
- Replace Array with REST Service Calls in Custom React Hook 5m
- Eliminate Client Loading Message with Server-side Rendering of HTML 2m
- Coding Server-side Rendering with No useEffect Lifecycle Event 5m
- Integrating Server-side Generated Code with useContext on the Client 2m
- Static Site Rendering and Near Infinite Site Scaling 4m
- Takeaways 1m
- Why Manage React State Globally? 3m
- Create a Global Context and Include in Our App 5m
- Replace Our Custom Hook Usage with a Reference to Global Context 3m
- Create a New Custom Hook for Counting Clicks Per Speaker 5m
- Consolidate and Totaling Favorite Click Counts to the Page Header 4m
- Creating Nested Global Contexts to Reduce Re-renders of Components 6m
- Handling Errors in Your React App 5m
- Using Context to Solve a Corner Case 3m
- Implementing Our Colorizing on Checkbox Change Bug Fix 5m
- Course and Module Takeaways 2m