First, create a new React project . Before implementation of any React project , S pend some time and think about the parts (components) of the application that you can divide into . As an example, I divide this weather app into three components. Header Weather Card List Weather Card Project File Structure index.js import React from ' react ' ; import ReactDOM from ' react-dom ' ; import ' ./index.css ' ; import App from ' ./App ' ; ReactDOM. render ( < React.StrictMode > < App /> </ React.StrictMode > , document . getElementById ( ' root ' ) ); app.js import ' ./App.css ' ; import Header from ' ./components/header ' ; import WeatherCards from ' ./components/weather-cards ' ; function App () { return ( ...
Prerequisites:- Node js installed on PC. Steps:- Create a new folder and open it. Open a command prompt from the current. Create a new React application - npx create-react-app <app-name> Navigate to application folder - cd <app-name> Run the application - npm start Launches the test runner - npm test Builds the app for production - npm run build React Documentation - https://reactjs.org/