next-intl pages error (TypError)
Unanswered
Giant panda posted this in #help-forum
Giant pandaOP
Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
TypeError: Cannot read properties of null (reading 'useState')
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
TypeError: Cannot read properties of null (reading 'useState')
6 Replies
Giant pandaOP
export default function App({Component, pageProps}) {
const router = useRouter();
return (
<>
<NextIntlClientProvider
locale={router.locale}
messages={pageProps.messages}
>
<Component {...pageProps} />
</NextIntlClientProvider>
</>
);
}Giant pandaOP
ping me on anything new pls
Giant pandaOP
Anyone who can help me?
@Giant panda is the component "use client"?
@Anay-208 <@1168906910683119739> is the component "use client"?
Giant pandaOP
Didn’t make any difference
Also im using Pages