A simple currency converter built with React. It allows users to convert between different currencies using real-time exchange rates.
- 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.
- Clone the repository:
git clone https://github.com/Mayank1053/CurrencyConverter.git
- Install dependencies:
npm install
- Install Tailwind and Lucid Icons library
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
npm install lucide-react
- Run the development server:
npm run dev
- Access the application: Open http://localhost:5173/ in your web browser.
src/App.jsx
: Main component of the application.src/hooks/useCurrencyInfo.js
: Custom hook for fetching currency data.
- 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.