Student starter code (30% baseline)
index.html- Main HTML pagescript.js- JavaScript logicstyles.css- Styling and layoutpackage.json- Dependenciessetup.sh- Setup scriptREADME.md- Instructions (below)💡 Download the ZIP, extract it, and follow the instructions below to get started!
This template provides a starter project for learning user authentication, profile management, and social connections in React Native with Expo.
This app demonstrates:
activity-09-user-profile/
├── App.js # Navigation setup with Context providers
├── app.json # Expo configuration
├── package.json # Dependencies
├── contexts/
│ ├── AuthContext.js # Authentication state (70% complete)
│ └── NotificationContext.js # Notifications (40% complete)
├── screens/
│ ├── SignInScreen.js # Sign in page (50% complete)
│ ├── ProfileScreen.js # User profile (100% complete)
│ └── ConnectionsScreen.js # Find friends (40% complete)
├── components/
│ ├── AuthForm.js # Login form (30% complete)
│ ├── UserCard.js # User display card (100% complete)
│ └── NotificationBadge.js # Notification indicator (100% complete)
├── services/
│ └── AuthService.js # Mock auth API (100% complete)
└── styles/
└── authStyles.js # Auth screen styles (100% complete)
npm install --legacy-peer-deps
Note: The --legacy-peer-deps flag is required for React 19.0.0 compatibility.
npx expo start
i in the terminala in the terminalUse these credentials to sign in:
demo@test.compassword123Location: screens/SignInScreen.js, line 13
Task: Complete the sign-in handler
Skills: Async/await, error handling, navigation
Location: components/AuthForm.js, line 17
Task: Create the authentication form UI
Skills: React components, form handling, conditional rendering
Location: contexts/AuthContext.js, line 28
Task: Implement authentication logic
Skills: Context API, AsyncStorage, service integration
Location: contexts/NotificationContext.js, line 8
Task: Create notification system
Skills: Context API, state management, array operations
Location: screens/ConnectionsScreen.js, line 26
Task: Toggle follow status
Skills: Array manipulation, conditional logic, state updates
Location: screens/ConnectionsScreen.js, line 38
Task: Display user list with FlatList
Skills: FlatList, component composition, props
Location: Integrated with TODO #5
Task: Trigger notifications on follow actions
Skills: Context usage, user feedback
By completing this activity, you will:
Solution: Ensure all dependencies are installed with --legacy-peer-deps
Solution: Check that NavigationContainer wraps the Stack.Navigator in App.js
Solution: Verify @react-native-async-storage/async-storage is installed
Solution: Ensure screens are wrapped in Context providers
Once you complete all TODOs, try these:
When complete:
expo export --output-dir distNeed Help? Check the MDX activity file for detailed explanations and examples.