Module '"react"' has no exported member 'experimental_useOptimistic'. #57026
Labels
bug
Issue was opened via the bug report template.
locked
TypeScript
Related to types with Next.js.
Upstream
Related to using Next.js with a third-party dependency. (e.g., React, UI/icon libraries, etc.).
Link to the code that reproduces this issue
https://github.com/grzegorzpokorski/useoptimistic-issue
To Reproduce
pnpm i && pnpm lint && pnpm build
pnpm lint
but build fails with following error:Current vs. Expected behavior
successfully build app
Verify canary release
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #1 SMP Fri Jan 27 02:56:13 UTC 2023 Binaries: Node: 18.18.2 npm: 9.8.1 Yarn: N/A pnpm: 8.9.2 Relevant Packages: next: 13.5.6 eslint-config-next: 13.5.6 react: 18.2.0 react-dom: 18.2.0 typescript: 5.2.2 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Not sure, ESLint (eslint-config-next)
Additional context
Recently React team removed
experimantal_
prefix from some hooks facebook/react#27459.I see that Next.js uses under hood experimental version of the React library where
useOptimistic
does not require prefix but at build is usedstable
version of React what causes error and fails build (?)The text was updated successfully, but these errors were encountered: