Last active
March 29, 2016 10:51
-
-
Save anselmdk/16218a0bca8745e74d19 to your computer and use it in GitHub Desktop.
React Cheat Sheet
{Array(10).fill(1).map((el, i) =>
<ObjectRow key={i + 1} />
)}
TODO: these might be simplifyable
//switch
{(() => {
switch (this.state.color) {
case "red": return "#FF0000";
case "green": return "#00FF00";
case "blue": return "#0000FF";
default: return "#FFFFFF";
}
})()}
//if
{(() => { if (conditionIsMet) { return (
<div>The condition is met</div>
)}})()}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment