next.js13 Questions

3

In < Next 13 (or with appDir disabled), you could do: const MyComponent = () => { const router = useRouter(); const toggleStatic = () => { if (router.query.static) { router.push(rou...
Gio asked 13/4, 2023 at 15:55

1

My NextJS 13 server (app router) logs an error TypeError: Response body object should not be disturbed or locked that I don't know how to trace. It occasionally happens when I try to register a new...
Frisbee asked 4/10, 2023 at 10:24

4

I'm building a blog using Next.js and I'm utilizing the new app router for navigation. However, I'm encountering an issue where every blog page displays the same title and description. Upon investi...
Baines asked 9/6, 2023 at 15:57

1

I am struggling to use Capacitor for my NextJS 13 application which uses new the App router. Is it possible to somehow create an "out" folder and a "index.html" when building th...

3

I am trying to figure out how to pass a variable declared on the server side of my nextjs 13 app into a client side function that I have declared in one of my component files. As you can see in my ...
Controvert asked 16/4, 2023 at 17:42

2

How to add noindex in metadata on nextjs 13? Tried to add to "noindex: true" with no success here: export const metadata = { title: "Website title", description: "My des...
Xeres asked 25/2, 2023 at 12:8

3

Error: Cannot find module 'next/dist\client\components\static-generation-async-storage.external.js' I have this problem in my nextjs app, I am using typescript and tailwind, I am trying to deploy m...
Autobiography asked 6/12, 2023 at 17:34

3

I'm migrating my Next 12 app to Next 13 and its new /app directory. I have a <LoginPage> component (rendered @ /login) and obviously, it needs to use hooks to manage form data. As such, I hav...
Scrutineer asked 3/6, 2023 at 19:27

6

Solved

How do you pass props to the the page.jsx of layout? (NEXT 13) //app/blog/layout.jsx export default function RootLayout({ children }) { return ( <div> <Navbar /> <Sidebar /> ...
Terrie asked 25/11, 2022 at 13:2

2

I'm using the zod library to validate a form in my Next.js application. I've defined a schema for a subscription form that should validate an email field. I want to display a custom error message -...
Dogtooth asked 16/9, 2023 at 13:39

1

I'm using the date library by Mui and it requires a provider to be wrapped around all components: import { LocalizationProvider } from '@mui/x-date-pickers'; import { AdapterDayjs } from '@mui/x-da...
Chiefly asked 10/7, 2023 at 12:17

4

With nextjs 12 (pages router) the router returned from 'next/router' had navigation events you could listen for and handle appropriately. Here is the documentation. One specific event is routeChang...
Yowl asked 13/10, 2023 at 14:23

2

I’ve been playing with React Server Components for nearly 2 weeks now and this question has been making my brain hurt: how do you provide context to server components? Like for example, providing a...

4

Solved

I'm using next auth v4 with next js 13 beta with server component, and everything works fine. But I have a situation where I will need to know the logged user id, since I'm using next auth, I have ...
Tupler asked 10/2, 2023 at 16:4

0

When running a Next.js (v14) site through Google Lighthouse CSS files served on my App Router always get flagged as a render-blocking resource. When using the Page Router this isn't an issue, as Ne...

1

Above is the structure of my app router. It has a root layout that has to be shared with every one. Now inside the login component there is another layout.jsx that should NOT share the root layout...
Jessi asked 12/1 at 12:39

2

Here is my folder structure I was following nextjs docs to make modal as their nextgram example, I list items on feedback route when i hit one of them it should be routing local/feedback to local/...
Balladeer asked 29/10, 2023 at 18:52

1

Solved

I am trying to add internationalisation to my next.js project using @formatjs/intl-localematcher. I added a config file with the following code: // i18n.config.ts export const i18n = { defaultLoc...
Jenellejenesia asked 14/10, 2023 at 8:45

4

Solved

I am trying to create a page with dashboard layout and a page with default Next.js 13 layout. I have a problem on the dashboard page. When I go to the addresses in the dashboard, the display of men...
Wymore asked 11/2, 2023 at 21:39

3

I make project using nextjs 13.4.7 and already install swr in 3 PC but I got the same error: Attempted import error: 'swr' does not contain a default export (imported as 'useSWR'). error TypeError:...
Barreto asked 26/6, 2023 at 5:21

4

I have a client component called CampaignTable. The CampaignTable component expects a columns object to render the columns. Inside my columns object I import a server component called CampaignActio...
Publicness asked 25/7, 2023 at 9:52

4

I want to access the search params in a Component or in Layout File to get the lang. There is an way to do that? I Read that is impossible to get the searchparams in Layout File, but there is any o...
Frigging asked 27/3, 2023 at 22:49

3

I've been trying to implement pdf parsing logic in my Next JS app. It seems the libraries pdf2json and pdf-parse don't work with the new Next JS app router. Steps to reproduce: Run npx create-next...
Harald asked 7/6, 2023 at 14:6

3

Solved

Right now am using different ways to return API HTTP status in my NextJS-13 but nothing seems to be working for me. Note: I am using Typescript in my project. Here is my code with static 200 API re...
Gervase asked 24/3, 2023 at 16:1

3

Solved

I'm currently learning Next.js 13 and I'm trying to fetch data from a PocketBase database to display in a table. I've created an API route that connects to the database and retrieves the data. Howe...
Fulgurating asked 1/8, 2023 at 4:51

© 2022 - 2024 — McMap. All rights reserved.