Skip to main content

Rules of Hooks

  1. Only Call hooks from a React Component Function ( The first rule means that you should not be calling hooks from regular Javascript functions, instead you should only call them from inside a React component function. )
  2. Only Call hooks at the top level of React Component Function
  3. Call multiple State or effect hooks inside a Component
  4. Make these multiple hook calls in the same sequence.