DEV Community

Cover image for Learn useState In 7 Minutes - React Hooks Explained
Kunal Garg
Kunal Garg

Posted on

2

Learn useState In 7 Minutes - React Hooks Explained

Today we are going to learn about the state in React i.e. Hooks

Why hooks? When to use all this we will cover.

Rules of Hooks
Hooks are JavaScript functions, but they impose two additional rules:

  1. Only call Hooks at the top level. Don’t call Hooks inside loops, conditions, or nested functions.
  2. Only call Hooks from React function components.

For tutorial you can refer

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay