()
| 2 | import Counting from "./Counting"; |
| 3 | |
| 4 | function Clock(){ |
| 5 | |
| 6 | const [clocks,setClocks] = useState(["A","B","C"]); |
| 7 | |
| 8 | function handlChange(){ |
| 9 | setClocks(["D",...clocks]); |
| 10 | } |
| 11 | |
| 12 | return ( |
| 13 | <> |
| 14 | <button onClick={handlChange}>Increment Clocks</button> |
| 15 | <div style={{display:"flex", justifyContent:"center", alignItems:"center", gap:"20px", flexWrap:"wrap"}}> |
| 16 | {clocks.map(clock => <Counting key={clock} name={clock}></Counting> )} |
| 17 | </div> |
| 18 | </> |
| 19 | ) |
| 20 | } |
| 21 | |
| 22 | export default Clock; |
nothing calls this directly
no outgoing calls
no test coverage detected