@@ -253,11 +253,11 @@ need a lifecycle that is narrower than the whole component instance.
|
|||||||
|
|
||||||
## Useful Effect-FC Hooks
|
## Useful Effect-FC Hooks
|
||||||
|
|
||||||
The most common Effect-FC hooks are:
|
|
||||||
|
|
||||||
Unlike plain React hooks, Effect-FC hooks return Effects. Use `yield*` to run
|
Unlike plain React hooks, Effect-FC hooks return Effects. Use `yield*` to run
|
||||||
them inside the component body.
|
them inside the component body.
|
||||||
|
|
||||||
|
The most common Effect-FC hooks are:
|
||||||
|
|
||||||
- `Component.useOnMount`: run an Effect once during the component's first render
|
- `Component.useOnMount`: run an Effect once during the component's first render
|
||||||
after mount, and return its value. The Effect must be synchronous.
|
after mount, and return its value. The Effect must be synchronous.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user