The country dropdown in Clima React App is populated with seven hard-codedDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/jantoniogc/CursoReact-Clima/llms.txt
Use this file to discover all available pages before exploring further.
<option> elements defined in src/components/Formulario.jsx. Only these countries are available by default; the user must select one before submitting a search.
The select markup from the source (lines 55–63):
src/components/Formulario.jsx
Supported countries
| Country code | Country name |
|---|---|
| US | Estados Unidos (United States) |
| MX | México (Mexico) |
| AR | Argentina |
| CO | Colombia |
| CR | Costa Rica |
| ES | España (Spain) |
| PE | Perú (Peru) |
How city and country are sent to the API
When the user submits the form, the app combines the city input and the selected country code into a single query string using the format{ciudad},{pais}. For example:
Madrid,ESBuenos Aires,ARLima,PE
q parameter, so the spelling and format must match what the API expects.
Tips for accurate searches
- Use the English or local spelling of the city name (e.g.,
Mexico CityorCiudad de México). - Avoid accented characters or special symbols if the API does not return results — try an unaccented variant instead.
- Major cities and regional capitals are more reliably found than small towns or rural localities.
Adding more countries
For example, to add Chile:src/components/Formulario.jsx
<select> block. No other changes are needed; the app will include the new country in the dropdown immediately.