Created
July 8, 2019 11:17
-
-
Save parwatcodes/23d7c4c6f714fe234e39969d65d2e1ab to your computer and use it in GitHub Desktop.
react-inline-conditionally-pass-prop-to-component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { editable, editableOpts } = this.props; | |
return ( | |
<Child {...(editable && { editable: editableOpts } )} /> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment