-
Course
- Core Tech
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 | 20s
- Learn How React Hooks Makes React Better with a Simple Example | 4m 15s
- Setting up Our React Tool Chain | 6m 13s
- Our First React Hook setState, and Tracking Input Field Value | 5m 41s
- Using useRef to Enable Mouseover to Colorize an Image | 5m 58s
- Learning How to Use the useEffect Hook | 4m 42s
- Using useEffect, useRef and useState for Colorizing on Scroll | 5m 45s
- Improving and Fixing Our Scrolling Colorizing React App | 3m 2s
- Adding a Side Effect to Our Scroller Component | 5m
- Optimizing Performance with the useEffect Dependency Array | 2m 10s
- Takeaways | 1m 17s
About the author
Peter is the founder of Silicon Valley Code Camp and long-time software professional specializing in mobile and web technologies. He has also been a Microsoft MVP in ASP.NET since 2006.
More Courses by Peter