This example shows rendering of the flag of France with React. The example handles mouse clicks maintaining separate counts for the number of clicks on each vertical section of the flag, and a counter for overall clicks.
- Install nodejs and npm
- Use create-react-app to create application template
- npx create-react-app my-app
- Save files
- App.js into my-app/src/App.js
- App.css into my-app/src/App.css
- Start the app
- cd my-app
- npm start
- The application should be accessible on: http://localhost:5009