Currency Converter

A simple currency converter built with React. It allows users to convert between different currencies using real-time exchange rates.

Features

  • Fetches currency data from the @fawazahmed0/currency-api using the fetch API.
  • Displays a dropdown menu with a list of available currencies.
  • Allows users to convert currencies and calculates the converted amount based on the fetched exchange rates.
  • Displays the converted amount in a clear and concise format.

Usage

  1. Clone the repository:
git clone https://github.com/Mayank1053/CurrencyConverter.git
  1. Install dependencies:
npm install
  1. Install Tailwind and Lucid Icons library
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
npm install lucide-react
  1. Run the development server:
npm run dev
  1. Access the application: Open http://localhost:5173/ in your web browser.

Screenshot

Currency Converter

Files

  • src/App.jsx: Main component of the application.
  • src/hooks/useCurrencyInfo.js: Custom hook for fetching currency data.

Notes

  • The application uses the @fawazahmed0/currency-api for real-time exchange rates.
  • The useCurrencyInfo hook fetches data only when the selected currency changes.
  • The application is responsive and works on different screen sizes.