Using Spreadsheet with NextJS
SSR is supported, but Server components, not yet
Add use client
at the top of your file, so this component will be part of client bundle
More info here - https://beta.nextjs.org/docs/rendering/server-and-client-components#convention
Loading Canvas in Node
NextJS throws error while compiling canvas during SSR. If you see these errors,
the solution would be to install canvas
and add it as an external module in nextJS
CSS Specificity when importing stylesheet
NextJS does not respect the order of CSS imports. So there could be style conflicts if you are using tailwindcss in a nextJS project.
The proposed solution is
Install
postcss-import
and add it to yourpostcss.config.js
Import spreadsheet style using the import statement
Credit to https://github.com/radix-ui/themes/issues/109#issuecomment-1747345743 for the fix
Last updated