megaMenu with NextJs server side - feature request

UI Components for React
Post Reply
chrishj
Posts: 229
Joined: 11 Jul 2011, 21:58
Location: England, Lancashire
Contact:

12 Nov 2022, 09:24

Hi,
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} />
Is it possible to have a parameter so useState is not used for NextJs serverside components?
PrimeReact: 9.6.0
NextJs: 13.4.12
Theme Apollo v9.0
Database pg 8.8.0
react-hook-form: 7.38.0

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

13 Nov 2022, 14:44

You would probably have to request this enhancment on the GitHub Issues page.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

chrishj
Posts: 229
Joined: 11 Jul 2011, 21:58
Location: England, Lancashire
Contact:

14 Nov 2022, 13:09

Thanks, I have created the request on Github
PrimeReact: 9.6.0
NextJs: 13.4.12
Theme Apollo v9.0
Database pg 8.8.0
react-hook-form: 7.38.0

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests