Creating a button component in React is made simple with this approach. You can also use hooks like useCounter to easily manage increment and decrement operations.
Install my-project with npm
npm i @dhananjaywarade/uida
import { useCounter,Button} from "@dhananjaywarade/uida";
function App() {
const {count,increment,decerement} = useCounter();
return (
<>
<Button onclick={increment}>+</Button>
<h1>{count}</h1>
<Button onclick={decerement}>-</Button>
</>
)
}
export default App