score:10

Accepted answer

Here is one way we've found to keep the PropType optional but still have the Flow type check pass.

...

handleClick: function() {
  var exampleFn = this.props.exampleFn || null;
  if (exampleFn) {
    exampleFn();
  }
},

...

Related Query

More Query from same tag