I have a component that receives different props dynamically. How do I show this with propTypes? I was thinking something like this -
export default class Component extends React.Component {
static propTypes = {
propsOne: PropTypes.object,
};
// OR
static propTypes = {
propsTwo: PropTypes.object,
};
// ...
}
You could use a custom validator, with one level of abstraction to specify the prop names