29 ms·
Thanks for mentioning Mithril, I didn't know about it. It looks very interesting. I've been meaning to try React.js for a while now, just haven't found the time
by rmsaksida 12y ago
Thanks for mentioning Mithril, I didn't know about it. It looks very interesting. I've been meaning to try React.js for a while now, just haven't found the time.
About Mithril, HTML generation with JavaScript is an odd design choice. Obviously it's much better from a technical point of view, but nested or complex HTML must get ugly fast, and I really don't want to deal with template code written by non-developers. Having said that, for a certain class of apps with high performance requirements and comprehensive browser support, Mithril is a very appealing option.
- insin 12y ago> but nested or complex HTML must get ugly fast That's the problem JSX solves - nesting tags and attributes is less syntactically onerous than managing a tree of function calls or nested object structures, with their attendant braces and commas. Here's the Mithril getting started example [1] done using JSX [2], for comparison (some of the other code has changed since I did this, but the rendering part looks the same) [1] http://lhorie.github.io/mithril/getting-started.html#summary http://lhorie.github.io/mithril/getting-started.html#summary [2] https://github.com/insin/msx/blob/master/test/jsx/example.jsx https://github.com/insin/msx/blob/master/test/jsx/example.js...
- kallussed 12y agoI like JSX, but I would say that Mithril + CoffeeScript is even nicer. A coffeescript example (not mine): http://www.reddit.com/r/javascript/comments/20pzbj/mithril_a_javascript_framework_for_building/ckfgfey http://www.reddit.com/r/javascript/comments/20pzbj/mithril_a... or https://github.com/Whoaa512/mithril-coffee-gulp-seed/blob/master/app/scripts/components/MyComponent.coffee https://github.com/Whoaa512/mithril-coffee-gulp-seed/blob/ma... Looks really clean...