Replies: 1 comment
-
|
In Next v15, this was changed as part of something called Async APIs. Where access to some APIs is done via Promises. This allows Next.js to track param access. Specifically, when it happens. It has to do with how asynchronous code works, but let's not get into that for now, and it helps Next.js know exactly how much work has been done up to the point where the access happens, important for pages/layouts and it is adapted into Route Handlers with a similar API. During the whole v15 range, both sync and async access were allowed, but as of v16 only async access is allowed. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
This code I had to change it to await:
but this one works fine without the await:
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions