A modern React Native application for tracking cryptocurrency market data in real-time. Built with TypeScript and powered by the CoinGecko API.

- 📊 Real-time Market Data: View current cryptocurrency prices and 24h changes
- 🔄 Pull-to-Refresh: Update data with a simple pull gesture
- 📱 Responsive Design: Clean, modern UI optimized for mobile devices
- ⚡ Fast Performance: Efficient data fetching with React Query
- 🎯 Pagination: Browse through multiple pages of market data
- 💾 State Management: Persistent preferences with Zustand
The app displays a clean list of cryptocurrencies with:
- Coin icons and names
- Current prices in USD
- 24-hour price change percentages (color-coded)
- Market cap rankings
- React Native 0.73.9 - Cross-platform mobile development
- TypeScript - Type-safe development
- React Query (TanStack Query) - Server state management and caching
- Zustand - Lightweight state management
- Axios - HTTP client for API requests
- CoinGecko API - Cryptocurrency market data
- Node.js >= 18
- React Native development environment
- iOS Simulator (for iOS development)
- Android Studio (for Android development)
- Clone the repository:
git clone https://github.com/Matthew3dg/react-native-crypto-statistic.git
cd react-native-crypto-statistic
- Install dependencies:
yarn install
# or
npm install
- For iOS, install CocoaPods dependencies:
cd ios && pod install && cd ..
yarn ios
# or
npm run ios
yarn android
# or
npm run android
yarn start
# or
npm start
src/
├── api/
│ └── coingecko.ts # CoinGecko API client and types
├── components/
│ └── CoinRow.tsx # Individual coin display component
├── hooks/
│ └── useMarketsQuery.ts # React Query hook for market data
├── providers/
│ └── QueryProvider.tsx # React Query provider setup
├── screens/
│ └── MarketsScreen.tsx # Main markets listing screen
└── store/
└── preferences.ts # Zustand store for app preferences
The main screen displaying a paginated list of cryptocurrencies with:
- Pull-to-refresh functionality
- Pagination controls
- Loading states
- Error handling
Individual coin display component showing:
- Coin icon and name
- Current price
- 24h price change (color-coded)
- Uses CoinGecko's public API
- Implements proper error handling
- Configurable pagination and currency preferences
yarn start
- Start the Metro bundleryarn ios
- Run on iOS simulatoryarn android
- Run on Android emulatoryarn test
- Run testsyarn lint
- Run ESLint
The app uses the following default settings:
- Currency: USD
- Items per page: 25
- API timeout: 15 seconds
These can be modified in the preferences store.
The project follows React Native best practices:
- TypeScript for type safety
- Functional components with hooks
- Proper separation of concerns
- Clean component architecture
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This app uses the CoinGecko API which is free for public use. No API key is required for basic market data.
- Efficient data caching with React Query
- Optimized FlatList rendering
- Minimal re-renders with proper state management
- Image caching for coin icons