This Currency Converter App is a user-friendly web application developed using React. It facilitates quick and accurate currency conversions by fetching real-time exchange rates from an API.
Explore the live demo: Currency Converter App Demo
- Fetches currency exchange rates from Currency API.
- Allows users to input the amount for conversion.
- Provides a dropdown to select source and target currencies.
- Supports easy swapping of source and target currencies.
- Displays the converted amount instantly.
- Ensure Node.js is installed on your machine.
-
Clone the repository:
git clone https://github.com/AmanKumarSinhaGitHub/Live-Currency-Convertor.git
-
Navigate to the project directory:
cd Live-Currency-Convertor
-
Install dependencies:
npm install
-
Run the application:
npm run dev
-
Open your browser and go to http://localhost:5173.
-
Enter the amount, select the source and target currencies, and click the "Convert" button.
-
Optionally, use the "Swap" button to switch the source and target currencies.
- Main component rendering the entire application.
- Manages state for amount, source currency, target currency, and converted amount.
- Utilizes the
useCurrencyInfo
custom hook to fetch currency exchange rates.
- Custom hook to fetch real-time currency exchange rates from an external API.
- Utilizes the
fetch
function to retrieve data and update the component state.
- Reusable component for input fields.
- Accepts props such as label, amount, currency options, and handles user input for amount and currency selection.
Feel free to contribute to the project by submitting issues or pull requests. Your contributions are highly appreciated!
The app fetches real-time exchange rates from the Currency API, ensuring accurate and up-to-date information.
Happy converting! 💰🔄