Skip to content

Commit 07c65b7

Browse files
Merge pull request supabase#5171 from asyncxco/patch-1
Update with-expo.mdx
2 parents 688e75e + 129d0bb commit 07c65b7

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

web/docs/guides/with-expo.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,12 @@ expo init supabaseReactNative
154154
cd supabaseReactNative
155155
```
156156

157-
Then let's install the only additional dependency: [supabase-js](https://github.com/supabase/supabase-js)
157+
Then let's install the additional dependencies: [supabase-js](https://github.com/supabase/supabase-js)
158158

159159
```bash
160160
yarn add @supabase/supabase-js
161+
yarn add react-native-elements
162+
yarn add react-native-safe-area-context
161163
```
162164

163165
Now let's create a helper file to initialize the Supabase client.
@@ -182,7 +184,7 @@ We'll use Magic Links, so users can sign in with their email without using passw
182184
```jsx title="components/Auth.js"
183185
import React, {useState} from 'react'
184186
import {Alert, StyleSheet, View} from 'react-native'
185-
import {supabaseClient} from '../lib/initSupabase'
187+
import {supabase} from '../lib/supabase'
186188
import {Button, Input} from 'react-native-elements'
187189

188190
export default function Auth() {
@@ -267,7 +269,7 @@ Let's create a new component for that called `Account.js`.
267269

268270
```jsx title="components/Account.js"
269271
import { useState, useEffect } from 'react'
270-
import { supabase } from '../utils/supabaseClient'
272+
import { supabase } from '../utils/supabase'
271273
import {StyleSheet, View} from 'react-native'
272274

273275
import {Button, Input} from 'react-native-elements'
@@ -386,10 +388,10 @@ Now that we have all the components in place, let's update `app.js`:
386388

387389
```jsx title="app.js"
388390
import { useState, useEffect } from 'react'
389-
import { supabase } from './lib/supabaseClient'
391+
import { supabase } from './lib/supabase'
390392
import Auth from './components/Auth'
391393
import Account from './components/Account'
392-
import View from 'react-native'
394+
import { View } from 'react-native'
393395

394396
export default function App() {
395397
const [session, setSession] = useState(null)

0 commit comments

Comments
 (0)