Skip to content
Snippets Groups Projects
Commit 24cbe1fc authored by Viarezo's avatar Viarezo
Browse files

no

parent 3ad72c72
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,7 @@ const App = () => {
<h1>Bienvenue sur notre super site !</h1>
</div>
</div>
<Counter />
<Counter title="Un compteur : insane"/>
</div>
);
}
......
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"}}> genre ça vaut {count}</p>
<p style={{margin: "1em auto"}}>Imagine ce truc pourrait compter les clics ?</p>
</div>
)
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment