Skip to content

using nextJS to develop a simple bitcoin value tracker

Notifications You must be signed in to change notification settings

prithesh07/BitCoinTracker

Repository files navigation

🚀 Next.js Crypto App

This project is built with Next.js, using create-next-app. It fetches and displays cryptocurrency data from the CoinGecko API.

📂 Setup

  1. Clone the repository: git clone https://github.com/prithesh07/BitCoinTracker cd Crypto-app

  2. Install dependencies: npm install

  3. Run the development server: npm run dev

⚙️ API Integration

⚛️ State Management

  • React Query: Used for data fetching, caching, and background refetching.
  • Simplifies server-side data management.
  • Provides automatic caching, error handling, and background refetching.
  • React Con API: Used for global state management (e.g., selected cryptocurrency, theme preferences).
  • Avoids prop drilling.

⚠️ Challenges & Solutions

  1. Handling Large Amounts of Data:
  • Challenge: The API provides a lot of data, which could slow down the app.
  • Solution: React Query caching and pagination (50 items per page).
  1. Managing State Across Components:
  • Challenge: Sharing the state between different components.
  • Solution: React Query for server-side data, React Con API for global state.
  1. API Rate Limiting:
  • Challenge: CoinGecko API has rate limits.
  • Solution: React Query caching reduces unnecessary requests; graceful error handling.
  1. Pagination:
  • Challenge: Handling pagination efficiently.
  • Solution: Implemented pagination controls to fetch and display data in chunks (50 items per page) to improve performance.

📜 License

MIT License © PritheshSubramani

About

using nextJS to develop a simple bitcoin value tracker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published