Last active
December 22, 2017 18:33
-
-
Save hrdtbs/1023eea1061863b4aa008b201d8f1a67 to your computer and use it in GitHub Desktop.
React - Marge Styles
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
//Object.assign: | |
<div style={Object.assign({}, style1, style2)}/> | |
//Lodash's assign function: | |
<div style={_.assign({}, style1, style2)}/> | |
//ES7 object spread: | |
<div style={{...style1, ...style2}}/> | |
//radium: | |
<div style={[style1, style2]}/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment