Main App Screen
After subscription, users land on your main app.File
app/(main)/index.tsx
Subscription Guard
The layout checks subscription status:Adding Screens
Create files inapp/(main)/:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Building your main app experience
app/(main)/index.tsx
// app/(main)/_layout.tsx
const { isSubscribed } = useSubscription();
if (!isSubscribed) {
return <Redirect href="/paywall" />;
}
app/(main)/:
app/(main)/
├── index.tsx # Home
├── profile.tsx # Profile
├── settings.tsx # Settings
import { useRouter } from 'expo-router';
const router = useRouter();
router.push('/(main)/profile');
import { Tabs } from 'expo-router';
export default function MainLayout() {
return (
<Tabs>
<Tabs.Screen name="index" options={{ title: 'Home' }} />
<Tabs.Screen name="profile" options={{ title: 'Profile' }} />
</Tabs>
);
}