use-between icon indicating copy to clipboard operation
use-between copied to clipboard

React 19: add support for useEffectEvent hook

Open shsr04 opened this issue 7 months ago • 0 comments

This MR provides support for the new React 19 hook useEffectEvent.

This is a useful hook when you want to ignore "non-reactive" callbacks from effect dependencies.

After some npm dependency hacking, I got it to work locally and also added a unit test.

Note the particular design of useEffectEvent, which I have reproduced in this implementation:

Effect Event functions do not have a stable identity. Their identity intentionally changes on every render.

Let me know what you think 😎

shsr04 avatar Apr 17 '26 19:04 shsr04