import { useDispatch } from "react-redux";
import increment from "./action";
function Button() {
const dispatch = useDispatch();
const handleClick = () => {
dispatch(increment);
};
return (
<div>
<button onClick={handleClick}> Click here </button>
</div>
);
}
export default Button;