9
createServerClient singleton pattern Nextjs App Router
Source: supabase/supabase#26936 · opened by @andrewdoro
I am looking for a way to create a singleton pattern for createServerClient.
Describe the problem
[Add a link to the page which needs improvement (if relevant)](
using the pattern from docs with createClient will create a connection for each invocation. This is problematic when calling this in multiple Server Components. I am not sure what's the cost of doing this.
Describe the improvement
the following example fails on build on nextjs
Describe the problem
[Add a link to the page which needs improvement (if relevant)](
using the pattern from docs with createClient will create a connection for each invocation. This is problematic when calling this in multiple Server Components. I am not sure what's the cost of doing this.
Describe the improvement
the following example fails on build on nextjs
No pledges yet. Be the first to back this.
Comments
Similar requests
Put versions on documentation
2 votes · 0 comments
SessionContextProvider!!
2 votes · 0 comments
Add OAuth example 👁️⚡👁️ with Supabase+Nextjs (app dir) & cookies
2 votes · 0 comments
Enable Supabase SSR cookies with Vike Cloudflare
1 vote · 0 comments
Vote for Supabase UI Library components
4 votes · 0 comments
No comments yet.