Skip to content

Commit e05afa5

Browse files
authored
useEffectEvent revamp (#8279)
1 parent ff17a86 commit e05afa5

File tree

2 files changed

+498
-35
lines changed

2 files changed

+498
-35
lines changed

src/content/reference/react/hooks.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ There are two rarely used variations of `useEffect` with differences in timing:
7979
* [`useLayoutEffect`](/reference/react/useLayoutEffect) fires before the browser repaints the screen. You can measure layout here.
8080
* [`useInsertionEffect`](/reference/react/useInsertionEffect) fires before React makes changes to the DOM. Libraries can insert dynamic CSS here.
8181
82+
You can also separate events from Effects:
83+
84+
- [`useEffectEvent`](/reference/react/useEffectEvent) creates a non-reactive event to fire from any Effect hook.
8285
---
8386
8487
## Performance Hooks {/*performance-hooks*/}

0 commit comments

Comments
 (0)