React Hooks

React Hooks are first introduced in 16.8 and it allows functional component to access state and other React features without the need of Class component.

Although React Hooks are the recommended approach to write React component, but there are no plan to remove Class component in the near future.

There are few built-in hooks provided by React for developer to access state and lifecycle method.

  1. useState
  2. useEffect
  3. useContext
  4. useReducer
  5. useCallback
  6. useMemo
  7. Writing your own hook
Exit mobile version