Questions tagged [app-router]

116 questions
4
votes
1 answer

How do I pass data from server component to client component in Next.js 13 app router?

How to pass data from the server component to the client component in Next.js 13 app router? I am calling an external API in page.tsx which gives the city of the person. I want to pass this city to the client component where this city can be…
4
votes
1 answer

Implementing module federation, app-router, and webpack with Next.js 13 - how to fix 'client-only' error?

I am currently working on implementing module federation in Next.js 13.4.4, utilizing the app-router feature and the @module-federation/nextjs-mf package. In order to achieve a micro front-end architecture, I have created a host app that imports…
3
votes
1 answer

How to correctly use the API routes in the Next JS 13 Using App Router framework

I'm fairly new to React JS and Next JS. I was previously using the Page Router API on Next JS but then switched to use the new App Router on Next JS 13. Previously, using the Page Router, the structure to create a single get request was to nest your…
BlackLabrador
  • 2,829
  • 5
  • 18
  • 21
3
votes
3 answers

How to use Redux Toolkit with Next.js and App-Router?

How to use Redux toolkit in NextJS 13 App router ? These are all my slices and code related to redux toolkit Is there anything wrong with the code coz I get this error in terminal saying , I think In Nextjs 13 we have to create a seperate provider…
Bipin
  • 53
  • 4
2
votes
0 answers

Error to call Approuter from Postman - SAP CAP (BTP) - *.us10-001.hana.ondemand.com/login/callback redirect

I am new to SAP BTP and currently setup a simple project with a server and approuter on SAP CAP in nodejs. But when querying the approuter url from postman it gives me the following error: Response:
2
votes
1 answer

Next js 13 App router build error. (when i try fetch api route in server component)

I get an error when i build next app (yarn run build) I made new clean project i tried there. This is my route (/api/categories/route.ts) export async function GET() { return new Response(JSON.stringify({ msg: "categories" })); } And my…
2
votes
0 answers

NextAuth gives error OAUTH_CALLBACK_ERROR invalid_client when authenticating with a custom provider

I'm trying to use NextAuth to authenticate with a custom oauth2 provider (Whoop), but after the login completes on the whoop servers and I'm redirected back to my application, NextAuth throws the following…
2
votes
0 answers

how to fix Nextjs13 could not find the module app-router.js#

after running npx create-next-app@latest, I said yes to use App Router(as it recommends to use it). but after that when I run npm run dev I'm getting the following errors. Uncaught Error: Could not find the module…
Sahil
  • 21
  • 2
2
votes
1 answer

How to load different components on a static URL

I have three pages application where first page have URL with menu name like - http://localhost:3000/careers/ and second page where listing page loaded and it's URL is optional parameters like, If i choose skill then it will append…
neha910
  • 199
  • 3
  • 12
2
votes
1 answer

Polymer app-route return empty data attributes

I'm learning Polymer and i got some issues with app-route and app-location. I tried a simple example like this: