Update hooks-overview.md (#1320)

This commit is contained in:
v891
2018-10-26 17:40:48 -05:00
committed by Sophie Alpert
parent a1c7038255
commit a8bf119e01

View File

@@ -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.