Skip to main content

Documentation 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.

Clima React App is bootstrapped with Create React App, which means the build script produces a fully static site — plain HTML, JavaScript, and CSS files — that you can host on any static file server or CDN without a Node.js runtime.

Available scripts

The package.json defines four scripts:
ScriptCommandPurpose
npm startreact-scripts startDevelopment server on port 3000 with hot reload
npm run buildreact-scripts buildProduction build output to the build/ directory
npm testreact-scripts testRuns the test suite with Jest
npm run ejectreact-scripts ejectEjects from Create React App (irreversible)

Steps to create a production build

1

Replace the API key

Open src/App.js and replace the hardcoded OpenWeatherMap API key with your own. See API setup for instructions on obtaining a key.
2

Run the build command

npm run build
3

Inspect the build/ folder

After the command completes, the build/ directory contains:
  • index.html — the app shell with injected script and style tags
  • static/js/ — minified JavaScript bundles with content-hash filenames (e.g., main.a1b2c3d4.chunk.js)
  • static/css/ — minified CSS bundles with content-hash filenames
  • Public assets copied from the public/ directory (favicon, manifest, logos)

What react-scripts build does

Under the hood, react-scripts build runs Webpack in production mode:
  • Bundles and minifies JavaScript — all modules are combined and whitespace/comments are stripped
  • Tree-shaking — unused code is removed from the final bundle
  • Content-hash filenames — each output file gets a hash derived from its contents, enabling aggressive cache busting without invalidating unchanged files
  • CSS extraction and minification — styles are extracted into separate .css files and minified
The eject script is a one-way operation. Once you run npm run eject, the Create React App configuration is copied into your project and cannot be undone. Only eject if you need direct control over the Webpack, Babel, or ESLint configuration.
The build/ directory is listed in .gitignore by default and should not be committed to version control. Deploy its contents to your host instead.

Build docs developers (and LLMs) love