diff --git a/src/App.js b/src/App.js index e06c5306cf17a67cf4fb741484bc5743996cfc0c..5687b2ae5e491fae79f2fd3f7d64167e14f115f7 100644 --- a/src/App.js +++ b/src/App.js @@ -2,6 +2,10 @@ import './App.css'; import { Counter } from './Counter'; const App = () => { + const compteurs = [] + for (let pas = 0; pas < 5; pas++) { + compteurs.push(<Counter title={"Le compteur n° "+String(pas)}/>) + } return ( <div> <div className="App"> @@ -9,7 +13,7 @@ const App = () => { <h1>Bienvenue sur notre super site !</h1> </div> </div> - <Counter title="Un compteur : insane"/> + {compteurs} </div> ); }