From 22004523f433d7aad18df7a89f7ba5e3c0f7d319 Mon Sep 17 00:00:00 2001 From: tatsuteb Date: Wed, 23 Oct 2024 09:30:47 +0900 Subject: [PATCH] [Docs] Remove the 'new' keyword from the GET function sample code. The json() method returns a Response object, so remove the new keyword. --- docs/02-app/02-api-reference/02-file-conventions/route.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/02-app/02-api-reference/02-file-conventions/route.mdx b/docs/02-app/02-api-reference/02-file-conventions/route.mdx index afe7b17c3bf80..6a02881797be8 100644 --- a/docs/02-app/02-api-reference/02-file-conventions/route.mdx +++ b/docs/02-app/02-api-reference/02-file-conventions/route.mdx @@ -7,13 +7,13 @@ Route Handlers allow you to create custom request handlers for a given route usi ```ts filename="route.ts" switcher export async function GET() { - return new Response.json({ message: 'Hello World' }) + return Response.json({ message: 'Hello World' }) } ``` ```js filename="route.js" switcher export async function GET() { - return new Response.json({ message: 'Hello World' }) + return Response.json({ message: 'Hello World' }) } ```