React Server Side component cannot render class components.
error - node_modules/.pnpm/react-share@4.4.1_react@18.2.0/node_modules/react-share/lib/ShareButton.js (11:18) @ eval
error - Class extends value undefined is not a constructor or null
This might be caused by a React Class Component being rendered in a Server Component, React Class Components only works in Client Components. Read more: https://nextjs.org/docs/messages/class-component-in-server-component
This might be caused by a React Class Component being rendered in a Server Component, React Class Components only works in Client Components. Read more: https://nextjs.org/docs/messages/class-component-in-server-component
at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/react-share@4.4.1_react@18.2.0/node_modules/react-share/lib/ShareButton.js:14:58)
ShareButton exports a class component
A temporary solution is to add 'use client'; in your custom Share component
React Server Side component cannot render class components.
ShareButton exports a class component
A temporary solution is to add
'use client';
in your custom Share component