useSession hook not callable

I just added better auth to my project and can't use the hook, I get an error saying:
No constituent of type 'Atom<{ data: { user: { id: string; name: string; email: string; emailVerified: boolean; createdAt: Date; updatedAt: Date; image?: string | null | undefined; }; session: { id: string; createdAt: Date; ... 5 more ...; userAgent?: string | ... 1 more ... | undefined; }; } | null; error: BetterFetchError | null; isPendi...' is callable.ts(2349)
No constituent of type 'Atom<{ data: { user: { id: string; name: string; email: string; emailVerified: boolean; createdAt: Date; updatedAt: Date; image?: string | null | undefined; }; session: { id: string; createdAt: Date; ... 5 more ...; userAgent?: string | ... 1 more ... | undefined; }; } | null; error: BetterFetchError | null; isPendi...' is callable.ts(2349)
Did I miss something in my configuration?
Solution:
are you importing authClient from better-auth/react?
Jump to solution
2 Replies
Solution
Blank
Blank4mo ago
are you importing authClient from better-auth/react?
coder2000
coder2000OP4mo ago
No, it was client. Thanks

Did you find this page helpful?