First, let us understand why do we need hooks?

When we create function components instead of class components, we miss some of the main functions provided by react i.e. life cycle components like componentDidMount, etc. So we to overcome this limitation we have hooks. Hooks allow us to hook into the react state and also life cycle features from function components.

There are many react hooks, let us discuss some of them

  • useSelector()

This hook can be used when the application wants to read any data from the redux store. For example, we have a redux store and we want…

Lokesh

Software Engineer. To know more about me check https://lokesh-online.web.app

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store