Re:JSX is no longer my friend
by okso on Wednesday March 16, 2016 @06:31AM
(#11296241)
Replacing JSX with Coffeescript is really beautiful, and makes large components much more readable. I am a bit worried as it does not have much traction. JSX does not even allow to copy-paste from HTML as we need to rename all keys containing hyphens with some CamelCase.
Here is some of my Coffeescript render function, it is much more elegant than the equivalent JSX.
render: ->
div
className: "btn-group"
role: "group"
style:
width: '100%'
Here is some of my Coffeescript render function, it is much more elegant than the equivalent JSX.
render: -> div className: "btn-group" role: "group" style: width: '100%'