Skip to content

Update Next.js docs for 13.1. #7097

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 12, 2023
Merged

Update Next.js docs for 13.1. #7097

merged 1 commit into from
Jan 12, 2023

Conversation

leerob
Copy link
Contributor

@leerob leerob commented Dec 23, 2022

As of Next.js 13.1, the light Edge Runtime is no longer experimental. This PR updates the documentation to remove the experimental- prefix, which is no longer needed.

Note: If you are using experimental-edge in 13.1, it will still work. However, we recommend new applications start out without using the experimental- prefix.

Further, this PR also removes the recommendation for the global runtime configuration option. We generally do not recommend that, and instead, recommend adding this at the route level. Finally, Response.json is recommended.

}
}
)
return Response.json({ name: 'John Doe' })

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need NextReponse for .json helper to be working

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah good point, hmm.

whatwg/fetch#1389

Copy link

@karlhorky karlhorky Feb 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whatwg/fetch#1389 has a checkmark next to Cloudflare Workers - is Response.json() implemented and working there now?

cc @jasnell

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see these checkmarks are only "implementer interest" - if this does not yet exist on Cloudflare, maybe another PR should be done until Cloudflare Workers supports this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Workers have supported Response.json for a long time :)

Copy link
Contributor

@GregBrimble GregBrimble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for updating this, @leerob ! Much appreciated! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants