diff --git a/.changeset/calm-pandas-sync.md b/.changeset/calm-pandas-sync.md new file mode 100644 index 00000000000..5c49dbaaa31 --- /dev/null +++ b/.changeset/calm-pandas-sync.md @@ -0,0 +1,5 @@ +--- +'@clerk/expo': patch +--- + +Add an experimental `ClerkProvider` option to disable native client synchronization when Clerk native components are not used. diff --git a/integration/templates/expo-native/App.tsx b/integration/templates/expo-native/App.tsx index 967814e9f68..b2cb3d42a71 100644 --- a/integration/templates/expo-native/App.tsx +++ b/integration/templates/expo-native/App.tsx @@ -4,9 +4,7 @@ import { tokenCache } from '@clerk/expo/token-cache'; import { useState } from 'react'; import { Button, Modal, StyleSheet, Text, View } from 'react-native'; -import { E2EControls } from './components/E2EControls'; import { GoogleSignInButton } from './components/GoogleSignInButton'; -import { JsSignInForm } from './components/JsSignInForm'; const publishableKey = process.env.EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY; @@ -19,7 +17,19 @@ function NativeBuildFixture() { const { user } = useUser(); const [isAuthOpen, setIsAuthOpen] = useState(false); const [isProfileOpen, setIsProfileOpen] = useState(false); - const [e2eStatus, setE2eStatus] = useState(null); + + if (isProfileOpen) { + return ( + + + setIsProfileOpen(false)} + /> + + + ); + } return ( @@ -36,9 +46,6 @@ function NativeBuildFixture() { onPress={() => setIsAuthOpen(true)} /> {!isSignedIn && } - {!isSignedIn && } - {isSignedIn && } - {e2eStatus && {e2eStatus}} {isSignedIn && (