This quickstart walks you through cloning the Clima React App repository, installing its dependencies, obtaining an OpenWeatherMap API key, wiring that key into the source code, and launching the local development server. By the end you will have a running weather lookup app atDocumentation 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.
http://localhost:3000.
Install dependencies
Install the project’s npm dependencies. The app uses React 16,
react-dom, and react-scripts — no additional UI libraries need to be installed locally.Get an OpenWeatherMap API key
Clima fetches weather data from the OpenWeatherMap Current Weather API. You need a free account to obtain an API key.
- Sign up at openweathermap.org.
- After confirming your email, navigate to API keys in your account dashboard.
- Copy the default key or generate a new one.
src/App.js at line 25 inside the useEffect hook that builds the request URL:src/App.js
Replace the API key
Open Save the file. If the dev server is already running, it will hot-reload automatically.
src/App.js and update line 25 with your own key:src/App.js
Materialize CSS (v1.0.0) is loaded directly from the Cloudflare CDN inside
public/index.html — both the stylesheet and the JS bundle. You do not need to install any additional CSS framework packages via npm.What happens on first load
When the app first renders, all state variables are in their initial values:busquedaholds{ ciudad: '', pais: '' }— the city and country fields in the form are empty.consultarisfalse, so theuseEffecthook skips the API call entirely.resultadois an empty object ({}).
resultado is an empty object, the Clima component receives it as its resultado prop. Inside Clima, the destructured name property is undefined. The component checks for this immediately:
src/components/Clima.jsx
name is undefined (falsy), Clima returns null and renders nothing. No weather card or error message is shown until the user submits a valid city and country through the form.