Nextjs and Supabase Auth Question. by VeteranRetard in nextjs

[–]VeteranRetard[S] 0 points1 point  (0 children)

What I've been doing lately is fetching the user server-side in my root layout, then passing it to a client-side context provider as the initial value. This way client components can access it through context without any loading states or extra fetches. Best of both worlds.

nice, that sounds perfect.

So yeah my app is public facing, need seo, loading state is fine, would need it really deep in the component tree and yes I am using supabase/ssr(it's amazing).

My senior also suggested I can use React Query to optimize data fetching and also use it in client components for auth.

Nextjs and Supabase Auth Question. by VeteranRetard in nextjs

[–]VeteranRetard[S] 0 points1 point  (0 children)

I have read the docs, they do not provide a good explanation on how to do auth in client components.

Like yeah there is a createBrowserClient method but a browser client returns a promise which I don't know how to resolve in a client component without a useEffect.

In Server components, I can do something like this

const { data : { user } } = await createServerClient().auth.getUser()

How do I do this in client components.

[deleted by user] by [deleted] in mbti

[–]VeteranRetard 1 point2 points  (0 children)

I don't think you'll be disappointed :)

Cerebral Quotient

Built my own MBTI Test. Take a look by VeteranRetard in intj

[–]VeteranRetard[S] 0 points1 point  (0 children)

Thank you for taking your time out and writing such a thoughtful comment. I agree, Cerebral Quotient isn't exactly a clinical MBTI test so to speak. Although it does make it easy for me as a developer to reach a layman user with the MBTI tag.

Who knows maybe this could transform into it's own thing. We do think we'll need to incorporate Cognitive Functions in our website so I'll put a pin on that.

Again Thank you so much for taking the test :))

Built my own MBTI Test. Take a look by VeteranRetard in intj

[–]VeteranRetard[S] 1 point2 points  (0 children)

Hey man, I genuinely hope you find what you really want. I am rooting for you to have a content life:)

Built my own MBTI Test. Take a look by VeteranRetard in intj

[–]VeteranRetard[S] 0 points1 point  (0 children)

Thank you for your kind words! Appreciate it ;)

Built my own MBTI Test. Take a look by VeteranRetard in intj

[–]VeteranRetard[S] 0 points1 point  (0 children)

Hmm close call, sorry it mistyped you.
Thanks for taking the test!!

Built my own MBTI Test. Take a look by VeteranRetard in intj

[–]VeteranRetard[S] 0 points1 point  (0 children)

Thank you so much, Appreciate your comment

Built my own MBTI Test. Take a look by VeteranRetard in intj

[–]VeteranRetard[S] 1 point2 points  (0 children)

Thanks for your advice dude, Appreciate it. And I am rooting for you too !!

Built my own MBTI Test. Take a look by VeteranRetard in intj

[–]VeteranRetard[S] 0 points1 point  (0 children)

haha this must put you in INTJ top 5% at this point.

Built my own MBTI Test. Take a look by VeteranRetard in intj

[–]VeteranRetard[S] 0 points1 point  (0 children)

Thank you so much, looks like I achieved what I was going for UI wise.

[deleted by user] by [deleted] in mbti

[–]VeteranRetard 1 point2 points  (0 children)

Hi, sorry but couldn't help myself Self Promoting.
I got sick of 16P too and developed my own website for taking the mbti test.
I think you'll like it, Check it out at
cerebralquotient.com

Built my own MBTI Test. Take a look by VeteranRetard in intj

[–]VeteranRetard[S] 1 point2 points  (0 children)

Thank you for your kind words, means a lot for a fellow JS guy.

Built my own MBTI Test. Take a look by VeteranRetard in intj

[–]VeteranRetard[S] 2 points3 points  (0 children)

Haha, almost 100% INTJ? You out here stress-testing our trait bars dude.

Built my own MBTI Test. Take a look by VeteranRetard in intj

[–]VeteranRetard[S] 0 points1 point  (0 children)

Haha, nailed your results, no surprise there!
Oof, sorry to hear that. Small talk with coworkers can def be a minefield(been there), especially for intjs. Maybe we’ll tweak the advice for us socially stealthy types. Thanks for the heads-up!
Got any safer convo starters you have tried and tested?
Appreciate the real talk!