Error: useSessionStorage is a client-only hook
reekrd opened this issue · comments
I'm importing useSessionStorage into a client component but get the error : useSessionStorage is a client-only hook
This happens during build thus the project can't be built.
And during development. My requested page gets a 500 error but still renders in the browser and data is set in the session storage.
Minimal reproduction can be found here: https://github.com/reekrd/min-rep-client-only-hook/
This is a duplicate of #218
As said in #254 (comment) 'use client' not always run on the client.