Relative Content

Tag Archive for next.jsreact-hooksnextjs14

“Error: useLocalStorage is a client-only hook” in next js 14

“useLocalStorage” is a client only hook I’m using useLocalStorage hook from @uidotdev/usehooks. Even though HomePage.tsx file is set to “use client”, I’m getting the following error: ⨯ Error: useLocalStorage is a client-only hook at HomePage (./src/components/HomePage.tsx:15:98) digest: “1786536127” GET / 500 in 180ms Even though the docs state that the hooks are “server-safe”, I keep […]