Onklick pada fragmen bereaksi
const addClickToComponent = ({component}) => (
React.cloneElement(component, {
onClick: someComplicatedClickFunction,
}
);
const ComponentWithClick = addClickToComponent(noClickComponent);
Cautious Cardinal