Questions tagged [nextjs13]

1277 questions
5
votes
1 answer

How to fetch an API with POST method in Next JS 13?

I just started using NEXTJS 13 version and it confused me a little bit. Well, This is my project structure: I have a user.ts file inside an api folder that has this code : const token = process.env.TOKEN; export async function GET(request:…
5
votes
0 answers

NextJS v13.1.1: How to type RootLayout component in layout.ts?

I'm using the app router in Next.js 13 v13.1.1 and the layout.ts file is required. I'm using typescript, so I need to type the props of the RootLayout component. Does Next.js declare/export or otherwise imply the proptypes for the RootLayout…
5
votes
3 answers

How to add Google Tag Manager to a NextJS website

From this answer and this article I've added a