Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/calm-pandas-sync.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/expo': patch
---

Add an experimental `ClerkProvider` option to disable native client synchronization when Clerk native components are not used.
28 changes: 13 additions & 15 deletions integration/templates/expo-native/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -19,7 +17,19 @@ function NativeBuildFixture() {
const { user } = useUser();
const [isAuthOpen, setIsAuthOpen] = useState(false);
const [isProfileOpen, setIsProfileOpen] = useState(false);
const [e2eStatus, setE2eStatus] = useState<string | null>(null);

if (isProfileOpen) {
return (
<View style={styles.container}>
<View style={styles.embeddedProfile}>
<UserProfileView
isDismissible={false}
onHostBack={() => setIsProfileOpen(false)}
/>
</View>
</View>
);
}

return (
<View style={styles.container}>
Expand All @@ -36,9 +46,6 @@ function NativeBuildFixture() {
onPress={() => setIsAuthOpen(true)}
/>
{!isSignedIn && <GoogleSignInButton />}
{!isSignedIn && <JsSignInForm onStatus={setE2eStatus} />}
{isSignedIn && <E2EControls onStatus={setE2eStatus} />}
{e2eStatus && <Text testID='e2e-status'>{e2eStatus}</Text>}
{isSignedIn && (
<Button
testID='open-embedded-profile-button'
Expand All @@ -54,15 +61,6 @@ function NativeBuildFixture() {
/>
)}

{isProfileOpen && (
<View style={styles.embeddedProfile}>
<UserProfileView
isDismissible={false}
onHostBack={() => setIsProfileOpen(false)}
/>
</View>
)}

<Modal
animationType='slide'
visible={isAuthOpen}
Expand Down
57 changes: 0 additions & 57 deletions integration/templates/expo-native/components/E2EControls.tsx

This file was deleted.

92 changes: 0 additions & 92 deletions integration/templates/expo-native/components/JsSignInForm.tsx

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading