Is it possible to specify what args to expect in a callback passed to a component?

56 views Asked by At

Let's say a have this component:

class MyComponent extends React.Component {
   // ...
}

MyComponent.propTypes = {
  name: React.PropTypes.string,
  onChange: React.PropTypes.func
};

How can I tell what are the possible args that onChange is called with?

<MyComponent name="bar" onChange={(iDontKnowWhatsHere) => {}} />
0

There are 0 answers