News for hackers. Stuff that matters.
Re:Release of Mithril 1.0 by yomly on Tuesday January 31, 2017 @09:19AM (#13530689)
This is a pretty cool library, for the people coming from React, the context switch for creating components needs not be so great:

For a stateless component which is implemented as a pure function, where you would normally write:

  myPText(myText) {
    return <p>{myText}</p>
  }
In mithril you would write:

  myPText(myText) {
    return m("p", myText)
  }
So the same vein of thinking can take you pretty far, but the benefit is that everything is Javascript so there is less context switching between framework and language!

EDIT: code snippet

Re:Release of Mithril 1.0 by patricius on Tuesday January 31, 2017 @11:33AM (#13532057)
Furthermore, you can easily use JSX in Mithril the way you do in React, and in React you can also use the JavaScript syntax instead of JSX (e.g. React.DOM.div).

Reference: http://mithril.js.org/jsx.html