Hooks bring a shift in the mental model of components. We need to change how we think about the component lifecycle - instead of mount and update, we need to think in terms of renders and effects.
Hooks are a new addition to React. They let you use state and other React features without writing a class.
The best way to learn a new tech is to practice it and build something with it. So, let’s learn while building a freaking game!
- UseState: Learn how to manage local date / state in a component
- Custom hooks: Build your own hooks to extract logic into reusable functions
- UseEffect Perform side effects in function components
- UseContext Subscribe to React context without introducing nesting
- UseRef Hold instance values in a function component