vercel / nextjs-subscription-payments

Clone, deploy, and fully customize a SaaS subscription application with Next.js.
https://subscription-payments.vercel.app/
MIT License
5.77k stars 1.18k forks source link

Question: Passing supabase to query functions? #354

Open stevengrimaldo opened 5 days ago

stevengrimaldo commented 5 days ago

Just out of curiosity how come you're importing the supabase createClient() functions on the pages and passing supabase to the query functions as an argument rather than just importing the createClient methods directly into the queries file?

Wondering if this was just a matter of preference or if there was a real technical reason as to one way or the other.

floatrx commented 5 days ago

Just out of curiosity how come you're importing the supabase createClient() functions on the pages and passing supabase to the query functions as an argument rather than just importing the createClient methods directly into the queries file?

Wondering if this was just a matter of preference or if there was a real technical reason as to one way or the other.

dependency injection