react-required-if
React PropType to conditionally add
.isRequired
based on other props
Install
$ npm install --save react-required-
Usage
;; Component static propTypes = disabled: PropTypesbool onClick: ; { return <button onClick=thispropsonClick>Click Me</button> }
Result:
;;;