onclick on fragment react

Solutions on MaxInterview for onclick on fragment react by the best coders in the world

showing results for - "onclick on fragment react"
Manuel
09 Sep 2016
1const addClickToComponent = ({component}) => (
2  React.cloneElement(component, {
3    onClick: someComplicatedClickFunction,
4  }
5);
6
7const ComponentWithClick = addClickToComponent(noClickComponent);