Next.js Discord

Discord Forum

Error "Rendered more hooks than during the previous render"

Unanswered
Oak apple gall wasp posted this in #help-forum
Open in Discord
Avatar
Oak apple gall waspOP
I am getting Sentry issues with this error, but it only happens for some users, it is not at all reproducible.
I've gone through all code in this page and there is no conditional hooks or anything.

Any ideas on how I can debug this further? Sentry does not give me any information on where in the code the issue is

1 Reply

Avatar
Oak apple gall waspOP
I have an index page that with the only purpose of redirecting to another page, which looks like this, but I don't see why this would be an issue
path: /app/users/[userID]/page.tsx
import { redirect } from "next/navigation";

type PageProps = {
    params: {
        userID: string;
    };
};

export default function Page({ params }: PageProps) {
    redirect(`/users/${params.userID}/overview`);
}