From ab5d4349ac6bfc9c4e6b2f0205af92eedf54b675 Mon Sep 17 00:00:00 2001 From: = <=> Date: Fri, 3 Apr 2026 14:16:17 +1000 Subject: [PATCH] task done --- labs/lab4/src/Task.jsx | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 labs/lab4/src/Task.jsx diff --git a/labs/lab4/src/Task.jsx b/labs/lab4/src/Task.jsx new file mode 100644 index 0000000..fa6b84a --- /dev/null +++ b/labs/lab4/src/Task.jsx @@ -0,0 +1,38 @@ +import { useState } from "react"; +const ClickableEntry = (props)=>{ + const [clickCount,updateClickCount] = useState(0) + + const clickHandler = (event)=>{ + updateClickCount(clickCount+1); + props.updateTotoal(); + } + + return( +
Totoal:{totalClickCount}
+ > + ) +} + + +export default Task; \ No newline at end of file