0PricingLogin
React Native Academy · Lesson

Setting Up Supabase Client in React Native

Create a Supabase project, install @supabase/supabase-js, initialize the client with your project URL and anon key, and configure AsyncStorage as the session store.

What Is Supabase?

Supabase is an open-source Firebase alternative that provides a hosted PostgreSQL database, authentication, real-time subscriptions, and file storage — all accessible through a simple JavaScript client. It is an excellent backend choice for React Native apps because it requires no server code for common operations.

Unlike Firebase, Supabase uses standard SQL and lets you query your data with full relational power. You create a project on supabase.com and get a project URL and an anon key that you use in your app.

Installing the Supabase JS Client

To use Supabase in a React Native project, install the official JavaScript client along with the AsyncStorage adapter that Supabase uses to persist auth sessions on mobile devices.

Run the following command in your project root. The @supabase/supabase-js package handles all API communication, while @react-native-async-storage/async-storage stores the session token between app launches.

npx expo install @supabase/supabase-js @react-native-async-storage/async-storage

All lessons in this course

  1. Setting Up Supabase Client in React Native
  2. Email and OAuth Authentication
  3. Querying the Database with the Supabase Client
  4. Real-Time Subscriptions
← Back to React Native Academy