News for hackers. Stuff that matters.
Re:Things every React.js beginner should know by munro on Monday January 25, 2016 @09:20PM (#10971487)

    (defui my-component [x]
      <h2 class=(when (selected? x) ["selected"])>Hello</h2>)
It's possible to macro the above to the code below, without any language extensions. IntelliJ has powerful nested DSL introspection, it would be neat if Cursive allowed to hook into this through defui's metadata for highlighting. I was a hater of JSX until I used it. Now I hate eDSLs. :D

    (defn my-component [x]
      [:h2 {:class (when (selected? x) ["selected"])} "Hello"])

There are no comments on this comment yet.