Skip to content

Commit

Permalink
docs: Simplified expo install
Browse files Browse the repository at this point in the history
  • Loading branch information
ntucker committed Jun 20, 2024
1 parent d670a3a commit 623c030
Showing 1 changed file with 8 additions and 23 deletions.
31 changes: 8 additions & 23 deletions docs/core/shared/_installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -79,36 +79,21 @@ export default function RootLayout({ children }) {
<TabItem value="expo">

```tsx title="app/_layout.tsx"
import {
DarkTheme,
DefaultTheme,
ThemeProvider,
} from '@react-navigation/native';
import { Stack } from 'expo-router';
import 'react-native-reanimated';
// highlight-next-line
import { DataProvider } from '@data-client/react';

import { useColorScheme } from '@/hooks/useColorScheme';

export default function RootLayout() {
const colorScheme = useColorScheme();

return (
<ThemeProvider
value={colorScheme === 'dark' ? DarkTheme : DefaultTheme}
>
// highlight-start
<DataProvider>
// highlight-end
<Stack>
<Stack.Screen name="index" />
</Stack>
// highlight-start
<DataProvider>
// highlight-end
<Stack>
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
<Stack.Screen name="+not-found" />
</Stack>
// highlight-start
</DataProvider>
// highlight-end
</ThemeProvider>
</DataProvider>
// highlight-end
);
}
```
Expand Down

0 comments on commit 623c030

Please sign in to comment.