Skip to main content

Main App Screen

After subscription, users land on your main app.

File

app/(main)/index.tsx

Subscription Guard

The layout checks subscription status:
// app/(main)/_layout.tsx
const { isSubscribed } = useSubscription();

if (!isSubscribed) {
  return <Redirect href="/paywall" />;
}

Adding Screens

Create files in 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');

Tab Navigation

For bottom tabs, update the layout:
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>
  );
}