Reading-Notes

Reading Notes Class 32

useReducer - The useReducer Hook is similar to the useState Hook. It allows for custom state logic. If you find yourself keeping track of multiple pieces of state that rely on complex logic, useReducer may be useful. useContext - Context provides a way to pass data or state through the component tree without having to pass props down manually through each nested component.

Using these two hooks together helps to simplify state management by centralizing and organizing the state logic. This makes it easier for us to understand the information and it cuts down on the amount of coupling.