File size: 353 Bytes
5800a99 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | import React from 'react';
import { useMemo } from 'react-redux';
interface ButtonProps {
onClick: () => void;
}
const Button: React.FC<ButtonProps> = ({ onClick }) => {
const dispatch = useDispatch();
return (
<button onClick={() => dispatch({ type: 'button_1', text: 'Button 1' })}>
Button 1
</button>
);
};
export default Button; |