Created
September 1, 2017 08:35
-
-
Save fromheten/5a9a6d88be7cff20af51d01db2af7bdd to your computer and use it in GitHub Desktop.
Hiccup-like rendering of React elements
This file contains hidden or 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 martinRender (e) { | |
if (Array.isArray(e[2])) { | |
return martinRender(e[2]) | |
} else { | |
return React.createElement.apply(this, e) | |
} | |
} |
Author
fromheten
commented
Sep 1, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment