question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

inconsistent naming for `const supabase = createClient()`

See original GitHub issue

Improve 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

image

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:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
thorwebdevcommented, Oct 31, 2022

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() 👍

1reaction
saltcodcommented, Oct 28, 2022

Thanks for flagging this @Dustin-dusTir — excellent suggestion. cc @dannykng to keep in the back of your mind.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found