score:4

Accepted answer
function withOnFoo<Props: {} & OwnProps>(
    WrappedComponent: ComponentType<Props>
): ComponentType<Props> {
    // implementation here ...
}

score:1

render() {
  const {onFoo, ...props} = this.props;
  return <WrappedComponent {...props} />;
}

Related Query

More Query from same tag