1.

What are the rules that must be followed while using React Hooks?

Answer»

There are 2 rules which must be followed while you code with Hooks:

  • REACT Hooks must be CALLED only at the top LEVEL. It is not allowed to call them inside the NESTED functions, loops, or conditions.
  • It is allowed to call the Hooks only from the React Function Components.


Discussion

No Comment Found