Accessing document in top level cause problems in server side rendering. There is one of them at util.js:43 but maybe there is more. With typeof document === 'undefined' we can find out that it code is in node or browser and don't access dom in case of node. An if (typeof document === 'undefined') return () => ({}); in the util.js should work if I understand your code correctly.
Accessing document in top level cause problems in server side rendering. There is one of them at
util.js:43but maybe there is more. Withtypeof document === 'undefined'we can find out that it code is in node or browser and don't access dom in case of node. Anif (typeof document === 'undefined') return () => ({});in theutil.jsshould work if I understand your code correctly.