JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Data Grid › Window not define Next.js even with dynamic import
Tagged: nextjs, react, typescript
Hi
I am trying smart grid in Next.js and getting this error window is not defined. Even though I am dynamically importing the grid following the example here: https://www.htmlelements.com/docs/grid-nextjs/
Error:
https://ibb.co/xqDNn7f
Code:
https://ibb.co/BLTJBKL
Regards
Bilal Yasin
Hi Bilal Yasin,
We will need a complete sample which either in stackblitz or codesandbox which shows the reported behavior.
Best regards, Peter Stoev
Smart UI Team https://www.htmlelements.com/
Here you go Stackblitz link with the issue: https://stackblitz.com/edit/github-kap7fe?file=pages/index.tsx
Hi,
I updated the sample – https://stackblitz.com/edit/github-kap7fe-vfqtjf?file=pages%2Findex.tsx