mirror of
https://github.com/ferdzo/serviceCRM.git
synced 2026-04-05 13:16:24 +00:00
Test
This commit is contained in:
26
frontend/servicecrm/src/components/Btn.jsx
Normal file
26
frontend/servicecrm/src/components/Btn.jsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import React from 'react';
|
||||
import {useState} from 'react';
|
||||
|
||||
function MyButton(){
|
||||
const [count, setCount]=useState(0);
|
||||
|
||||
function handleClick(){
|
||||
setCount(count+1);
|
||||
}
|
||||
|
||||
return(
|
||||
<div>
|
||||
<Dugme count={count} handleClick={handleClick}/>
|
||||
<Dugme count={count} handleClick={handleClick}/>
|
||||
</div>
|
||||
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
function Dugme({count, handleClick}){
|
||||
return(
|
||||
<button onClick={handleClick}>Clicked {count} times</button>
|
||||
)
|
||||
}
|
||||
export default MyButton;
|
||||
Reference in New Issue
Block a user