Summary
I hope you enjoyed reading this chapter, which is full of very good information pertaining to the new React Hooks. So far, you have learned how the new React Hooks work; how to fetch data with Hooks; how to migrate a class component to React Hooks; how the effects work, the difference between memo
, useMemo
, and useCallback
; and finally, you learned how the useReducer
Hook works and the main difference compared with react-redux
. This will help you to improve the performance of your React components.
In the next chapter, we will learn about React Router v6 and how to implement it in our projects.