T
TanStack3y ago
adverse-sapphire

I cannot use @tanstack/react-table in NextJS 13

Hello! I cannot use @tanstack/react-table in NextJS 13. I get this error;
./node_modules/.pnpm/@tanstack+react-table@8.9.0_react-dom@18.2.0_react@18.2.0/node_modules/@tanstack/react-table/build/lib/index.mjs
Attempted import error: 'useState' is not exported from 'react' (imported as 'React').
./node_modules/.pnpm/@tanstack+react-table@8.9.0_react-dom@18.2.0_react@18.2.0/node_modules/@tanstack/react-table/build/lib/index.mjs
Attempted import error: 'useState' is not exported from 'react' (imported as 'React').
1 Reply
extended-salmon
extended-salmon3y ago
I had a similar problem, It has something to do with trying to create a table on a server component. Try making a client component that just renders the table.

Did you find this page helpful?