I am attempting to use MegaMenu with NextJs 13 app dir.
I get the error message:
TypeError: React__namespace.useState is not a function
The NavBar.tsx code extract is
Code: Select all
import Link from 'next/link';
import { useRouter } from 'next/navigation';
import { InputText } from 'primereact/inputtext';
import { MegaMenu } from 'primereact/megamenu';
'use client';
return (
<>
<MegaMenu model={megaItems} orientation="horizontal" end={end} />