mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-24 04:33:10 +00:00
Update hooks-overview.md (#1320)
This commit is contained in:
@@ -231,7 +231,7 @@ function FriendListItem(props) {
|
||||
}
|
||||
```
|
||||
|
||||
The state of these components is completely independent. Hooks are a way to reuse *stateful logic*, not state itself. In fact, each *call* to a Hook has a competely isolated state -- so you can even use the same custom Hook twice in one component.
|
||||
The state of these components is completely independent. Hooks are a way to reuse *stateful logic*, not state itself. In fact, each *call* to a Hook has a completely isolated state -- so you can even use the same custom Hook twice in one component.
|
||||
|
||||
Custom Hooks are more of a convention than a feature. If a function's name starts with "`use`" and it calls other Hooks, we say it is a custom Hook. The `useSomething` naming convention is how our linter plugin is able to find bugs in the code using Hooks.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user