inconsistent naming for `const supabase = createClient()`
See original GitHub issueImprove documentation
In most of the documentation the supabaseClient Instance is named just supabase
.
All tutorials I have seen use the name supabase
based on a search in the repository, there are 22 occasions where it says const supabaseClient = createClient()
As a new user of supabase this has confused me.
Is there a good reason for the different naming conventions?
Link
Describe the improvement
I propose a careful search and replace with VSCode Regular expression in all .mdx files:
search: supabaseClient
replace: supabase
Additional context
Things to watch out when search and replacing:
- the file in which createClient is usually invoked is called supabaseClient.[js, ts, jsx]; we don’t want to change that.
- some other exceptions
the const supabaseClient = createClient()
naming is also used in some examples in .tsx files visible at https://supabase.com/edge-functions
I would be happy to make a pull request.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Supabase Documentation
You can initialize a new Supabase client using the createClient() method. The Supabase client is your entrypoint to the rest of the Supabase...
Read more >Inconsistent behaviour of auth in Supabase Client ... - GitHub
I log in my users from the popup , works fine: the session is stored in chrome.local.storage . BUT in the service-worker script,...
Read more >Authentication not working with Supabase and Node.js
I get the code from a React front-end, this link, which works okay. Below is my code. client.js const { createClient } =...
Read more >SvelteQuest V: Authentication - Medium
Import the createClient method from the Supabase package: import { createClient } from "@supabase/supabase-js"const client = createClient(
Read more >Inconsistent naming severity issue : RSRP-488582 - YouTrack
The "inconsistent naming" inspection in settings is turned off, ... dotnet_naming_symbols.constant_fields.required_modifiers = const # private fields with ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is sometimes used to distinguish between a browser client and a server client etc, but I think for the docs we can be consistent with using
const supabase = createClient()
👍Thanks for flagging this @Dustin-dusTir — excellent suggestion. cc @dannykng to keep in the back of your mind.