SwiftConvert - Real Time Currency Converter Tool

Creating the converter Now let’s move on to the converter itself. Similar to Google’s currency converter, we have three containers each containing a label as well as an input field or a dropdown: amount: To input the conversion amount from: To select the base currency to: To select the currency to convert to We also add a container to display the output and a button to run the calculation. For the dropdowns, we use an inline conditional statement to check if the rates have been fetched and then map out the available currencies. Since rates stores an object of exchange rates, we can use Object.keys() to get an array of the currency codes. Then we can .map() over that array to generate the