From 5e6189e996b94fa40716fa73b8e101c69c1c2955 Mon Sep 17 00:00:00 2001
From: Viarezo <viarezo@viarezo.fr>
Date: Sat, 9 Oct 2021 16:15:30 +0200
Subject: [PATCH] git gud

---
 src/Counter.js | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/Counter.js b/src/Counter.js
index 30052ce..a9d96ea 100644
--- a/src/Counter.js
+++ b/src/Counter.js
@@ -1,7 +1,10 @@
 import { useState } from "react";
 
 const Counter = (props) => {
-    const [count, setCount] = useState(0);
+/*    const [count, setCount] = useState(0);
+    const whenUclick = () => setCount(count+1);*/
+    let lecompte = 0;
+    const quantuclic = () => lecompte = lecompte+1;
     return (
         <div class="card" style={{width:"auto", margin: '2em'}}>
             <div class="card-header">
@@ -10,12 +13,12 @@ const Counter = (props) => {
             <button
                 type="button"
                 class="btn btn-primary"
-                onClick={()=>setCount(count+1)}
+                onClick={quantuclic}
                 style={{margin: "1em"}}
             >
                 Ce bouton incrémente
             </button>
-            <p style={{margin: "1em auto"}}>Là genre ça vaut {count}</p>
+            <p style={{margin: "1em auto"}}>Là genre ça vaut {lecompte}</p>
         </div>
     )
 };
-- 
GitLab