Next.js Discord

Discord Forum

w/ Supabase, How can I get the signed-in user data in client component?

Unanswered
Rohu posted this in #help-forum
Open in Discord
Avatar
RohuOP
I saw that there is a method for this(i.e. await supabase.auth.getUser()), but the client component(i.e. navbar) can't be an aync function. How can I use this method?

3 Replies

Avatar
The ORM Hopper
useAuth() hook
Avatar
RohuOP
Is it a React hook right? I'm a newby to React so I will look it up. Thanks!
Avatar
RohuOP
I think I can use the useEffect().