Lesson 9 of 10
Mini Project: Auth Stack + Main Tab App
Build a complete multi-screen app: Login screen connected to auth context, sign-out from the drawer, main tabs (Home/Search/Profile), nested detail stack inside Home tab, and a deep link that opens the ProductDetail screen.
Complete Navigation Architecture
// ---- Type declarations ----
// types/navigation.ts
import type { NavigatorScreenParams } from '@react-navigation/native';
import type { NativeStackScreenProps } from '@react-navigation/native-stack';
import type { BottomTabScreenProps } from '@react-navigation/bottom-tabs';
export type AuthStackParamList = {
Login: undefined;
Signup: undefined;
ForgotPassword: { email?: string };
};
export type HomeStackParamList = {
Feed: undefined;
PostDetail: { postId: string; authorName: string };
};
export type SearchStackParamList = { SearchHome: undefined; };
export type ProfileStackParamList = { ProfileHome: { userId?: string }; EditProfile: undefined; };
export type MainTabParamList = {
HomeTab: NavigatorScreenParams<HomeStackParamList>;
SearchTab: NavigatorScreenParams<SearchStackParamList>;
ProfileTab: NavigatorScreenParams<ProfileStackParamList>;
};
export type RootStackParamList = {
Auth: NavigatorScreenParams<AuthStackParamList>;
Main: NavigatorScreenParams<MainTabParamList>;
};
// ---- Deep link config ----
export const linkingConfig = {
prefixes: ['myapp://', 'https://myapp.com'],
config: {
screens: {
Main: {
screens: {
HomeTab: {
screens: {
Feed: 'feed',
PostDetail: 'post/:postId',
},
},
ProfileTab: {
screens: {
ProfileHome: 'user/:userId',
},
},
},
},
},
},
};
// ---- App entry ----
// App.tsx
export default function App() {
return (
<GestureHandlerRootView style={{ flex: 1 }}>
<SafeAreaProvider>
<AuthProvider>
<NavigationContainer linking={linkingConfig}>
<RootNavigator />
</NavigationContainer>
</AuthProvider>
</SafeAreaProvider>
</GestureHandlerRootView>
);
}Tip
Tip
Practice Mini Project Auth Stack Main Tab App in small, isolated examples before integrating into larger projects. Breaking concepts into small experiments builds genuine understanding faster than reading alone.
Complete navigation hierarchy with bottom tabs, details stack, and modal flow
Practice Task
Note
Practice Task - (1) Write a working example of Mini Project Auth Stack Main Tab App from scratch without looking at notes. (2) Modify it to handle an edge case (empty input, null value, or error state). (3) Share your solution in the Priygop community for feedback.
Quick Quiz
Common Mistake
Warning
A common mistake with Mini Project Auth Stack Main Tab App is skipping edge case testing - empty inputs, null values, and unexpected data types. Always validate boundary conditions to write robust, production-ready react native code.
Finished this lesson?