'useRef' is not exported from 'react'
Hi, on my NEXTJS website I try to install better auth and I have this error that I can't solve

4 Replies
https://github.com/better-auth/better-auth/issues/3123 can you please confirm if this is actually the issue ?
GitHub
Better Auth's React hooks fail when used with Next.js 15 App Router...
Is this suited for github? Yes, this is suited for github To Reproduce Create Next.js 15 app with App Router Install better-auth@1.2.10 Create auth client: import { createAuthClient } from "be...
I have the impression that it's the same mistake, yes.
I only have one version of React, so it must be because of the SSR :/.
Thank you
if you do have one version of react that's not the dual problem. your react client still referencing the right instance
how does this error appears ? after installing the better-auth or while using it ?
When I using it, I will try to reinstall better-auth of 0 I think, may I have broke something
Mb it's when I install them
To be more precise, the problem occurred when I exported the functions from my auth-client.ts to my lib/index.ts (useSession, signIn, signUp and signOut)