Browse Source

Update index.md (#4886)

main
Binoy Barman 2 years ago
committed by GitHub
parent
commit
47e1ce5d42
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      beta/src/pages/learn/index.md

2
beta/src/pages/learn/index.md

@ -384,7 +384,7 @@ Notice how each button "remembers" its own `count` state and doesn't affect othe
Functions starting with `use` are called *Hooks*. `useState` is a built-in Hook provided by React. You can find other built-in Hooks in the [React API reference](/apis). You can also write your own Hooks by combining the existing ones.
Hooks are more restrictive than regular functions. You can only call Hooks *at the top level* of your components (or other Hooks). If you want to `useState` in a condition or a loop, extract a new component and put it there.
Hooks are more restrictive than regular functions. You can only call Hooks *at the top level* of your components (or other Hooks). If you want to use `useState` in a condition or a loop, extract a new component and put it there.
## Sharing data between components {/*sharing-data-between-components*/}

Loading…
Cancel
Save