by tel · 12y ago · 0 comments
{div, ol, li} = React.DOM # global exports
div null,
ol null,
for result, index in @results
{a, span} = React.DOM # local exports
key = doSomeLookup( result, index )
href = otherLookup( key )
li {key}, [span(null, "Hello "), a({href}, "world")] div null,
RadComponent onClick: @handleClick, model: @props.thing
and so forth. <div>
<RadComponent onClick={this.handleClick} model={this.props.thing} />
</div>Syntax like this tends not to matter very much in my experience. What does matter is syntax changes that affect order dependence, and particularly nesting. Those really require changing the way you think - replacing one symbol with another is just a matter of plain & simple practice.
[0]: http://gulpjs.com
[1]: https://github.com/jjt/LUXTRUBUK/blob/master/gulpfile.js
[1]: http://brunch.io
({div, ol, li} = React.DOM) # global exports
(div null,
(ol null,
(for result, index in @results
({a, span} = React.DOM) # local exports
(key = (doSomeLookup result, index))
(href = (otherLookup key))
(li {key}, [span(null, "Hello "), a({href}, "world")])))
However, assignments and binary operators are still infix, and comas are needed.=^_^=