0
0
Supabasecloud~10 mins

Why Supabase is the open-source Firebase alternative - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to initialize a Supabase client with your project URL.

Supabase
const supabase = createClient('[1]', 'public-anonymous-key');
Drag options to blanks, or click blank then click option'
Ahttps://aws.amazon.com
Bhttps://firebase.google.com
Chttps://your-project.supabase.co
Dhttps://google.com
Attempts:
3 left
💡 Hint
Common Mistakes
Using Firebase or other cloud URLs instead of Supabase project URL.
2fill in blank
medium

Complete the code to sign up a user with email and password using Supabase.

Supabase
const { data, error } = await supabase.auth.[1]({ email, password });
Drag options to blanks, or click blank then click option'
Alogin
Bauthenticate
Cregister
DsignUp
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'login' or 'register' instead of 'signUp'.
3fill in blank
hard

Fix the error in the code to fetch data from a Supabase table named 'profiles'.

Supabase
const { data, error } = await supabase.from('[1]').select('*');
Drag options to blanks, or click blank then click option'
Aprofiles
Baccounts
Cusers
Dauth
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect table names like 'users' or 'auth'.
4fill in blank
hard

Fill both blanks to insert a new row into the 'messages' table with Supabase.

Supabase
const { data, error } = await supabase.from('[1]').insert({ text: [2] });
Drag options to blanks, or click blank then click option'
Amessages
B'Hello, world!'
Cusers
D'Welcome!'
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong table names or missing quotes around text.
5fill in blank
hard

Fill all three blanks to update a user's profile with Supabase.

Supabase
const { data, error } = await supabase.from('[1]').update({ [2]: [3] }).eq('id', userId);
Drag options to blanks, or click blank then click option'
Aprofiles
Busername
C'new_username'
Dusers
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong table names or missing quotes around the new username.