You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using createContext, SSR is broken for me. I'm getting this errors in the console when starting Next.js:
ReferenceError: CustomEvent is not defined
at dispatchEvent (file:///Users/eike.foken/Code/test-ui/node_modules/.pnpm/[email protected]/node_modules/atomico/src/element/set-prototype.js:95:50)
at ref.<computed> (file:///Users/eike.foken/Code/test-ui/node_modules/.pnpm/[email protected]/node_modules/atomico/src/hooks/custom-hooks/use-event.js:11:13)
at detectContext (file:///Users/eike.foken/Code/test-ui/node_modules/.pnpm/[email protected]/node_modules/atomico/src/context.js:21:9)
at load (file:///Users/eike.foken/Code/test-ui/node_modules/.pnpm/[email protected]/node_modules/atomico/src/hooks/hooks.js:19:56)
at file:///Users/eike.foken/Code/test-ui/node_modules/.pnpm/[email protected]/node_modules/atomico/src/hooks/hooks.js:21:24
at useHook (file:///Users/eike.foken/Code/test-ui/node_modules/.pnpm/[email protected]/node_modules/atomico/src/hooks/create-hooks.js:14:15)
at useState (file:///Users/eike.foken/Code/test-ui/node_modules/.pnpm/[email protected]/node_modules/atomico/src/hooks/hooks.js:17:12)
at useContext (file:///Users/eike.foken/Code/test-ui/node_modules/.pnpm/[email protected]/node_modules/atomico/src/context.js:35:49)
at useTheme (webpack-internal:///../packages/styles/src/theme/theme-provider.ts:19:68)
And also later on (if I polyfill CustomEvent with an empty function):
TypeError: node.dispatchEvent is not a function
Expected behavior
No errors in console
*SSR/SSG environment (Optional, required if the problem is caused by using SSR/SSG, please complete the following information):
Describe the bug
When using
createContext
, SSR is broken for me. I'm getting this errors in the console when starting Next.js:And also later on (if I polyfill CustomEvent with an empty function):
Expected behavior
No errors in console
*SSR/SSG environment (Optional, required if the problem is caused by using SSR/SSG, please complete the following information):
The text was updated successfully, but these errors were encountered: