Dom
Dom
SSolidJS
Created by Dom on 9/11/2024 in #support
Using localStorage after creating a project with solidstart
I've just created a project with solidstart and started to add an option for dark mode using localStorage, but get
10:47:37 [vite] Error when evaluating SSR module /src/entry-server.tsx:
|- ReferenceError: localStorage is not defined
10:47:37 [vite] Error when evaluating SSR module /src/entry-server.tsx:
|- ReferenceError: localStorage is not defined
as a result... I understand that when using SSR I won't have access to localStorage but I don't need SSR. How do I configure this properly? Can I simply delete entry-server?
5 replies