Re:Riot – A React-like, 2.5K user interface library
by insin on Friday January 23, 2015 @07:18AM
(#8934483)
I did a quick tweak of React's JSX transpiler to output mithril-compatible code [1], as the above was the sort of syntax I was using JSX to get away from!
return <html>
<body>
<input>
<button>Add</button>
<table>
<tbody>
<tr>
<td><input type="checkbox"/></td>
<td>task description</td>
</tr>
</tbody>
</table>
</body>
</html>
[1] https://github.com/insin/msx/
Re:Riot – A React-like, 2.5K user interface library
by tipiirai on Friday January 23, 2015 @08:31AM
(#8934701)
Definitely more readable than Mithril
Re:Riot – A React-like, 2.5K user interface library
by rapind on Friday January 23, 2015 @11:02PM
(#8938771)
I think it starts to look like HAML / Slim / Jade once you use CoffeeScript. Understandably not for everyone, but I quite like it, and it doesn't mess with your syntax highlighting like JSX does.
m "body",
m "input"
m "button", "Add"
m "table",
m "tr",
m "td",
m "input[type=checkbox]"
m "td", "task description"
return m("html", [
]);