-
Notifications
You must be signed in to change notification settings - Fork 29.2k
Closed as not planned
Labels
bugIssue was opened via the bug report template.Issue was opened via the bug report template.lockedstaleThe issue has not seen recent activity.The issue has not seen recent activity.
Description
Verify canary release
- I verified that the issue exists in the latest Next.js canary release
Provide environment information
Operating System:
Platform: darwin
Arch: x64
Version: Darwin Kernel Version 22.2.0: Fri Nov 11 02:08:47 PST 2022; root:xnu-8792.61.2~4/RELEASE_X86_64
Binaries:
Node: 16.16.0
npm: 8.11.0
Yarn: 1.22.18
pnpm: 7.1.7
Relevant packages:
next: 13.1.2-canary.4
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true)
Link to the code that reproduces this issue
https://github.com/amannn/nextjs-bug-use-server
To Reproduce
- Clone the repro
- Run
npm run dev
- Access http://localhost:3000
Describe the Bug
If I make use of use in an async component, this throws:
Expected Behavior
I understand that in an async component you'd typically use async
/await
. However for reusable library code that can be executed either on the server or the client side, it would be very helpful if use
can be called in server code as well.
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
JasperAlexander and louisthomaspro
Metadata
Metadata
Assignees
Labels
bugIssue was opened via the bug report template.Issue was opened via the bug report template.lockedstaleThe issue has not seen recent activity.The issue has not seen recent activity.