nextjs - 💡(How to fix) Fix useEffectEvent usage [16 comments, 11 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#84462Fetched 2026-04-08 02:19:18
View on GitHub
Comments
16
Participants
11
Timeline
42
Reactions
13
Author
Timeline (top)
commented ×16subscribed ×16mentioned ×2unsubscribed ×2

Error Message

  1. wait for the dev server to start—you'll see a runtime error: ⁠useEffectEvent is not a function Runtime error: ⁠useEffectEvent is not a function 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

Code Example

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
RAW_BUFFERClick to expand / collapse

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

extent analysis

TL;DR

The issue is likely due to a compatibility problem between React 19.2.0 and the current version of Next.js, and upgrading Next.js to the latest version may resolve the issue.

Guidance

  • Check the compatibility of React 19.2.0 with the current version of Next.js (15.4.6) and consider upgrading to the latest version of Next.js (15.5.4) as recommended.
  • Verify that the useEffectEvent hook is correctly imported and used in the code, ensuring it matches the documentation for React 19.2.0.
  • Review the React 19.2.0 documentation to confirm that useEffectEvent is a valid hook and that it is being used as intended.
  • If upgrading Next.js is not feasible, consider using a previous version of React that is compatible with the current version of Next.js.

Example

No code example is provided as the issue is more related to version compatibility rather than code syntax.

Notes

The issue may be specific to the combination of React 19.2.0 and Next.js 15.4.6, and upgrading Next.js may resolve the compatibility problem. However, without further testing, it's uncertain whether this will fully resolve the issue.

Recommendation

Apply workaround: Upgrade to the latest version of Next.js (15.5.4) to ensure compatibility with React 19.2.0, as the current version has a known compatibility issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

nextjs - 💡(How to fix) Fix useEffectEvent usage [16 comments, 11 participants]