Skip to content

A comprehensive collection of React Native exercises and mini-projects built with Expo. This repository showcases my journey learning mobile app development, covering fundamental concepts to advanced implementations across iOS and Android platforms.

Notifications You must be signed in to change notification settings

jefercort/practice-react-native

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“± React Native Practice

A comprehensive collection of React Native exercises and mini-projects built with Expo. This repository showcases my journey learning mobile app development, covering fundamental concepts to advanced implementations across iOS and Android platforms.

πŸš€ Overview

This repository contains various React Native practice projects and exercises designed to master mobile development concepts. Each project demonstrates different aspects of React Native development, from basic components to complex navigation patterns and native device features.

✨ Features & Learning Objectives

Core Concepts Mastered

  • πŸ“Š React Native Components - View, Text, ScrollView, FlatList, SectionList
  • 🎨 Styling - StyleSheet, Flexbox layouts, responsive design
  • πŸ”„ State Management - useState, useEffect, Context API
  • 🧭 Navigation - Stack, Tab, and Drawer navigation with React Navigation
  • πŸ“² Native Features - Camera, location, push notifications
  • 🎯 User Input - Forms, gestures, and touch handling
  • πŸ”Œ API Integration - Fetch data, handle async operations
  • πŸ’Ύ Data Persistence - AsyncStorage, SQLite

Platform-Specific Development

  • iOS Features - iOS-specific components and styling
  • Android Features - Android-specific implementations
  • Cross-Platform - Write once, run everywhere approach

πŸ› οΈ Tech Stack

Core Technologies

  • React Native - Cross-platform mobile framework
  • Expo SDK 51 - Development platform and libraries
  • JavaScript/TypeScript - Programming languages
  • React Hooks - Modern React patterns

Key Libraries

  • React Navigation - Routing and navigation
  • Expo Router - File-based routing
  • React Native Elements - UI toolkit
  • Expo AV - Audio and video functionality
  • Expo Camera - Camera access
  • Expo Location - GPS and location services
  • React Native Reanimated - Smooth animations
  • React Native Gesture Handler - Touch gestures

Development Tools

  • Expo Go - Testing on physical devices
  • EAS Build - Cloud build service
  • Metro Bundler - JavaScript bundler
  • ESLint & Prettier - Code quality tools

πŸ“ Project Structure

practice-react-native/
β”œβ”€β”€ 01-basics/
β”‚   β”œβ”€β”€ components-demo/
β”‚   β”œβ”€β”€ styling-flexbox/
β”‚   └── state-props/
β”œβ”€β”€ 02-navigation/
β”‚   β”œβ”€β”€ stack-navigation/
β”‚   β”œβ”€β”€ tab-navigation/
β”‚   └── drawer-navigation/
β”œβ”€β”€ 03-lists-data/
β”‚   β”œβ”€β”€ flatlist-example/
β”‚   β”œβ”€β”€ sectionlist-demo/
β”‚   └── api-integration/
β”œβ”€β”€ 04-forms-input/
β”‚   β”œβ”€β”€ text-input/
β”‚   β”œβ”€β”€ form-validation/
β”‚   └── picker-components/
β”œβ”€β”€ 05-native-features/
β”‚   β”œβ”€β”€ camera-app/
β”‚   β”œβ”€β”€ location-tracker/
β”‚   β”œβ”€β”€ push-notifications/
β”‚   └── media-library/
β”œβ”€β”€ 06-animations/
β”‚   β”œβ”€β”€ basic-animations/
β”‚   β”œβ”€β”€ gesture-animations/
β”‚   └── layout-animations/
β”œβ”€β”€ 07-mini-projects/
β”‚   β”œβ”€β”€ todo-app/
β”‚   β”œβ”€β”€ weather-app/
β”‚   β”œβ”€β”€ expense-tracker/
β”‚   └── recipe-finder/
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ images/
β”‚   β”œβ”€β”€ fonts/
β”‚   └── icons/
β”œβ”€β”€ components/
β”‚   └── shared/
β”œβ”€β”€ utils/
β”‚   └── helpers.js
β”œβ”€β”€ app.json
β”œβ”€β”€ App.js
β”œβ”€β”€ package.json
└── README.md

🎯 Practice Exercises

Exercise 1: Component Basics

Understanding core React Native components and their properties.

import { View, Text, Image, ScrollView } from 'react-native';

export default function ComponentDemo() {
  return (
    <ScrollView>
      <View style={styles.container}>
        <Text style={styles.title}>Hello React Native!</Text>
        <Image 
          source={{ uri: 'https://example.com/image.jpg' }}
          style={styles.image}
        />
      </View>
    </ScrollView>
  );
}

Exercise 2: Flexbox Layouts

Mastering responsive layouts with Flexbox.

const styles = StyleSheet.create({
  container: {
    flex: 1,
    flexDirection: 'row',
    justifyContent: 'space-between',
    alignItems: 'center',
    padding: 20,
  },
  box: {
    width: 100,
    height: 100,
    backgroundColor: '#3498db',
    borderRadius: 10,
  }
});

Exercise 3: Navigation Implementation

Setting up navigation between screens.

import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';

const Stack = createStackNavigator();

export default function App() {
  return (
    <NavigationContainer>
      <Stack.Navigator initialRouteName="Home">
        <Stack.Screen name="Home" component={HomeScreen} />
        <Stack.Screen name="Details" component={DetailsScreen} />
      </Stack.Navigator>
    </NavigationContainer>
  );
}

Exercise 4: API Integration

Fetching and displaying data from external APIs.

const [data, setData] = useState([]);
const [loading, setLoading] = useState(true);

useEffect(() => {
  fetchData();
}, []);

const fetchData = async () => {
  try {
    const response = await fetch('https://api.example.com/data');
    const json = await response.json();
    setData(json);
  } catch (error) {
    console.error(error);
  } finally {
    setLoading(false);
  }
};

Exercise 5: Native Device Features

Accessing camera and handling permissions.

import { Camera } from 'expo-camera';

const [hasPermission, setHasPermission] = useState(null);

useEffect(() => {
  (async () => {
    const { status } = await Camera.requestCameraPermissionsAsync();
    setHasPermission(status === 'granted');
  })();
}, []);

πŸ“± Mini Projects

1. Todo App

  • CRUD operations
  • AsyncStorage for persistence
  • Swipe to delete
  • Mark as complete

2. Weather App

  • Current location weather
  • Search by city
  • 5-day forecast
  • Beautiful UI with weather animations

3. Expense Tracker

  • Add/edit/delete expenses
  • Categories and tags
  • Monthly reports
  • Charts and statistics

4. Recipe Finder

  • Search recipes by ingredients
  • Save favorites
  • Step-by-step instructions
  • Shopping list generation

πŸ”§ Installation & Setup

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn
  • Expo CLI
  • iOS Simulator (Mac) or Android Emulator
  • Expo Go app on your phone

Getting Started

  1. Clone the repository

    git clone https://github.com/jefercort/practice-react-native.git
    cd practice-react-native
  2. Install dependencies

    npm install
    # or
    yarn install
  3. Start the development server

    npx expo start
    # or
    expo start
  4. Run on device/emulator

    • Press a for Android emulator
    • Press i for iOS simulator
    • Scan QR code with Expo Go app on your phone

πŸ“– Running Individual Exercises

Navigate to specific exercise directories:

cd 01-basics/components-demo
npx expo start

🎨 Styling Approach

This project uses multiple styling approaches:

  • StyleSheet API - Performance optimized styles
  • Inline Styles - Quick prototyping
  • Styled Components - Component-based styling
  • Platform-specific styles - iOS/Android variations

πŸ§ͺ Testing

# Run tests
npm test

# Run with coverage
npm run test:coverage

πŸ“š Key Learnings

Technical Skills

  • Cross-platform Development - One codebase for iOS and Android
  • Component Lifecycle - Understanding mounting, updating, unmounting
  • Performance Optimization - FlatList, memo, lazy loading
  • Debugging - React Native Debugger, Flipper
  • State Management - Local and global state patterns
  • Async Operations - Promises, async/await, error handling

Best Practices

  • Component reusability
  • Separation of concerns
  • Responsive design principles
  • Accessibility features
  • Performance monitoring
  • Error boundaries

🚧 Future Improvements

  • Add TypeScript support
  • Implement Redux for state management
  • Add unit and integration tests
  • Create custom native modules
  • Implement CI/CD with EAS Build
  • Add offline support
  • Implement deep linking
  • Add biometric authentication
  • Create animated onboarding
  • Add internationalization (i18n)
  • Implement push notifications
  • Add dark mode support

πŸ“± Deployment

Building for Production

# iOS
eas build --platform ios

# Android
eas build --platform android

# Both platforms
eas build --platform all

🀝 Contributing

Contributions are welcome! Feel free to submit issues and pull requests.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/NewExercise)
  3. Commit your changes (git commit -m 'Add new exercise')
  4. Push to the branch (git push origin feature/NewExercise)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘¨β€πŸ’» Author

Kevin Cortes

πŸ™ Acknowledgments

⭐ If you find this repository helpful, please give it a star!

πŸš€ Happy Coding with React Native!

About

A comprehensive collection of React Native exercises and mini-projects built with Expo. This repository showcases my journey learning mobile app development, covering fundamental concepts to advanced implementations across iOS and Android platforms.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published