Created
March 15, 2018 18:17
-
-
Save frankfaustino/07f9b6beff60a74ac589b3dd5ed7f9e1 to your computer and use it in GitHub Desktop.
React: rest/spread operator and props
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 MyComponent = ({ className, ...others }) => ( | |
<div className={className}> | |
<MyOtherComponent {...others} /> | |
</div> | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment