/react-hooks

Different types of Hooks in React

Primary LanguageHTML

React Hooks

Branch

  • Master
  • useState
    • Description - how to use useState with previous state, array and object
  • useEffect
    • Description
      • How to optimise code at every render(componentdidmount and componentdidupdate).
      • How to cleanup code(componentwillunmount).
      • How to fetch data from API inside useEffect and control next renders
  • useContext
    • Description - used to pass data via ContextAPI
  • useReducer
    • Description - used for stateManagement, similar to reducer in redux

Note: Each Branch describes different Hook