Skip to content

useEffectEvent usage #84462

@acd02

Description

@acd02

Link to the code that reproduces this issue

https://stackblitz.com/edit/stackblitz-starters-tbmhnpxw?file=app%2Fcontent.tsx

To Reproduce

  1. visit 👉 https://stackblitz.com/edit/stackblitz-starters-tbmhnpxw?file=app%2Fcontent.tsx
  2. wait for the dev server to start—you'll see a runtime error: ⁠useEffectEvent is not a function

Current vs. Expected behavior

Current:
Runtime error: ⁠useEffectEvent is not a function

Expected:
The ⁠useEffectEvent hook from React 19.2.0 should work

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: Ubuntu 20.04.0 LTS Thu Oct 02 2025 17:39:25 GMT+0200 (Central European Summer Time)
  Available memory (MB): NaN
  Available CPU cores: 2
Binaries:
  Node: 20.19.1
  npm: 10.8.2
  Yarn: 1.22.19
  pnpm: 8.15.6
Relevant Packages:
  next: 15.4.6 // There is a newer version (15.5.4) available, upgrade recommended! 
  eslint-config-next: 15.5.4
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.8.3

Which area(s) are affected? (Select all that apply)

Not sure

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

With the release of React 19.2.0, I wanted to test the new useEffectEvent hook, but importing it causes a runtime error in a Next.js app

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions