Closed beingtyson closed 1 month ago
I am trying to use atomWithStorage in Jotai with getOnInit set to true in a Next.js environment, but I encounter an error:
"ReferenceError: localStorage is not defined"
Due to this error, my client application resets to the initial value every time I refresh the page, even though I change the state.
I am trying to use atomWithStorage in Jotai with getOnInit set to true in a Next.js environment, but I encounter an error:
"ReferenceError: localStorage is not defined"
Due to this error, my client application resets to the initial value every time I refresh the page, even though I change the state.