docs: updated with-expo-react-native.mdx (#26705)

The `react-native-url-polyfill` is not needed in Expo anymore since SDK 50 (the latest SDK is 51).

You can read more about it here:  https://docs.expo.dev/versions/unversioned/sdk/url/

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
This commit is contained in:
Jacint VargaandCharis authored and GitHub committed 2024-06-04 03:37:44 +00:00
1 parent c4f90f68cc
commit 07bfcfbc3c
1 file changed
+2 -5
@@ -34,7 +34,7 @@ cd expo-user-management
Then let's install the additional dependencies: [supabase-js](https://github.com/supabase/supabase-js)
```bash
npx expo install @supabase/supabase-js @react-native-async-storage/async-storage @rneui/themed react-native-url-polyfill
npx expo install @supabase/supabase-js @react-native-async-storage/async-storage @rneui/themed
```
Now let's create a helper file to initialize the Supabase client.
@@ -52,7 +52,6 @@ These variables are safe to expose in your Expo app since Supabase has
<TabPanel id="async-storage" label="AsyncStorage">
```ts lib/supabase.ts
import 'react-native-url-polyfill/auto'
import AsyncStorage from '@react-native-async-storage/async-storage'
import { createClient } from '@supabase/supabase-js'
@@ -83,7 +82,7 @@ These variables are safe to expose in your Expo app since Supabase has
```bash
npm install @supabase/supabase-js
npm install @rneui/themed @react-native-async-storage/async-storage react-native-url-polyfill
npm install @rneui/themed @react-native-async-storage/async-storage
npm install aes-js react-native-get-random-values
npx expo install expo-secure-store
```
@@ -91,7 +90,6 @@ These variables are safe to expose in your Expo app since Supabase has
Implement a `LargeSecureStore` class to pass in as Auth storage for the `supabase-js` client:
```ts lib/supabase.ts
import "react-native-url-polyfill/auto";
import { createClient } from "@supabase/supabase-js";
import AsyncStorage from "@react-native-async-storage/async-storage";
import * as SecureStore from 'expo-secure-store';
@@ -405,7 +403,6 @@ const styles = StyleSheet.create({
Now that we have all the components in place, let's update `App.tsx`:
```tsx App.tsx
import 'react-native-url-polyfill/auto'
import { useState, useEffect } from 'react'
import { supabase } from './lib/supabase'
import Auth from './components/Auth'