diff --git a/src/App.js b/src/App.js index fddfc30340dcc4f534afa55269127f293f29e20f..e06c5306cf17a67cf4fb741484bc5743996cfc0c 100644 --- a/src/App.js +++ b/src/App.js @@ -9,7 +9,7 @@ const App = () => { <h1>Bienvenue sur notre super site !</h1> </div> </div> - <Counter /> + <Counter title="Un compteur : insane"/> </div> ); } diff --git a/src/Counter.js b/src/Counter.js index 30052ce3757dfaf0c528abc250b56eae9aef9502..e02551ad37f10c2abaff07627cfeef4c49f0f523 100644 --- a/src/Counter.js +++ b/src/Counter.js @@ -1,7 +1,4 @@ -import { useState } from "react"; - const Counter = (props) => { - const [count, setCount] = useState(0); return ( <div class="card" style={{width:"auto", margin: '2em'}}> <div class="card-header"> @@ -10,12 +7,11 @@ const Counter = (props) => { <button type="button" class="btn btn-primary" - onClick={()=>setCount(count+1)} style={{margin: "1em"}} > Ce bouton incrémente </button> - <p style={{margin: "1em auto"}}>Là genre ça vaut {count}</p> + <p style={{margin: "1em auto"}}>Imagine ce truc pourrait compter les clics ?</p> </div> ) };