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!
A weather app template for learning API integration with React Native and Expo SDK 54.
# Install dependencies
npm install --legacy-peer-deps
# Start development server
npx expo start
w in terminali (requires Xcode)a (requires Android Studio)activity-07-fetch-weather/
├── App.js # Main app (55% pre-built)
├── app.json # Expo configuration
├── package.json # Dependencies
├── services/
│ └── WeatherAPI.js # API service (0% complete) ← TODO #1
├── components/
│ ├── WeatherCard.js # Weather display (100% complete)
│ ├── LoadingSpinner.js # Loading UI (100% complete)
│ └── ErrorMessage.js # Error UI (100% complete)
└── README.md # This file
File: services/WeatherAPI.js
Implement the fetchWeather() and transformResponse() methods:
File: App.js
Add loading state management in loadWeather():
File: App.js
Add error handling in loadWeather():
Your completed app should:
Installation fails?
rm -rf node_modules package-lock.json
npm install --legacy-peer-deps
Metro bundler issues?
npx expo start --clear
Network error in app?
M1: Mobile Foundations | React Native & Expo SDK 54 | Telebort