Browse Source
* [Beta] Remove `useEvent` link * [Beta] Add `useEvent` stub page * [Beta] Update `useEvent` description * Update useEvent.md * Alphabetical Co-authored-by: dan <dan.abramov@gmail.com>main
committed by
GitHub
3 changed files with 28 additions and 1 deletions
@ -0,0 +1,22 @@ |
|||||
|
--- |
||||
|
title: useEvent |
||||
|
--- |
||||
|
|
||||
|
<Wip> |
||||
|
|
||||
|
This section is incomplete, please see the RFC doc for [useEvent](https://github.com/reactjs/rfcs/blob/useevent/text/0000-useevent.md). |
||||
|
|
||||
|
</Wip> |
||||
|
|
||||
|
|
||||
|
<Intro> |
||||
|
|
||||
|
`useEvent` is a React Hook that lets you extract non-reactive Effect logic into an [Event function.](/learn/separating-events-from-effects#declaring-an-event-function) |
||||
|
|
||||
|
```js |
||||
|
useEvent(callback) |
||||
|
``` |
||||
|
|
||||
|
</Intro> |
||||
|
|
||||
|
<InlineToc /> |
Loading…
Reference in new issue