Skip to content

Instantly share code, notes, and snippets.

@asyncanup
Last active November 25, 2020 09:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asyncanup/d001b51bddb6642ffc6c287845a87fa6 to your computer and use it in GitHub Desktop.
Save asyncanup/d001b51bddb6642ffc6c287845a87fa6 to your computer and use it in GitHub Desktop.
ReactJS in a tweet
React={Component:function(e){this.props=e},[C="createElement"]:(t,s,...a)=>t.bind?new t(s):(e=document[C](t),(()=>{for(n in s)e[n]=s[n]})(),g(a).map(t=>e[A](t.props?t.render():t.part?t:new Text(t))),e)},g=(e=>(e=e||[],e.map?e.flatMap(g):[e])),A="appendChild"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment