Last active
April 22, 2016 12:16
-
-
Save sebjwallace/3c78220420c1957228eaefc33e342098 to your computer and use it in GitHub Desktop.
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
function styles(padding){ | |
return { | |
padding: padding + 'px', | |
backgroundColor: '#ddd' | |
} | |
} | |
function Hello(name, styles){ | |
return ["div", {style:styles}, "Hello " + name] | |
} | |
ReactDOM.render( | |
React.createElement.apply( | |
this, Hello("World", styles(10)) | |
), | |
document.getElementById('container') | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment