Have you checked out MithrilJS (http://lhorie.github.io/mithril/)? It's similar to ReactJS in the sense you can use msx (jsx like templates) to compile down to JavaScript if you use something like gulp/gulp-browserify/mithrilify.
Something to keep in mind with ReactJS/MithrilJS is that in a lot of cases you will need to bring/build your own components, e.g. validation.
MithrilJS brings quite a lot to the table for its small code size (14 KB minified, 5 KB gzipped), e.g. built in http request (promise compatible), router, data-binding, IE 6+/mobile compatibility (requires XMLHttpRequest shim for IE 6, JSON2/3 and EcmaScript 5 shim for <= IE 7, otherwise no dependencies - see http://lhorie.github.io/mithril/tools.html) etc. The documentation is outstanding.
Just a tip if you want to try MithrilJS - a module is essentially an object that encapsulates the rendering of a component. The controller function initializes the component and the view renders it. The the controller and view functions are stateless (think static); the controller function gets called once to initialize state and the view - 1 or more times - gets passed the controller/state to (re)render the component. Calling m.module(<dom_element>, <module>) binds the module to the DOM element/renders the component into that DOM element.
I think it is pretty neat that you can use ReactJS/MithrilJS for SPA's (<!DOCTYPE html><script src=".../mithril.min.js"></script><script src=".../app.js"></script> example) as well as building in page views similar to what you would have used KnockoutJS for.
2 comments
[ 24.8 ms ] story [ 480 ms ] threadSomething to keep in mind with ReactJS/MithrilJS is that in a lot of cases you will need to bring/build your own components, e.g. validation.
MithrilJS brings quite a lot to the table for its small code size (14 KB minified, 5 KB gzipped), e.g. built in http request (promise compatible), router, data-binding, IE 6+/mobile compatibility (requires XMLHttpRequest shim for IE 6, JSON2/3 and EcmaScript 5 shim for <= IE 7, otherwise no dependencies - see http://lhorie.github.io/mithril/tools.html) etc. The documentation is outstanding.
Just a tip if you want to try MithrilJS - a module is essentially an object that encapsulates the rendering of a component. The controller function initializes the component and the view renders it. The the controller and view functions are stateless (think static); the controller function gets called once to initialize state and the view - 1 or more times - gets passed the controller/state to (re)render the component. Calling m.module(<dom_element>, <module>) binds the module to the DOM element/renders the component into that DOM element.
I think it is pretty neat that you can use ReactJS/MithrilJS for SPA's (<!DOCTYPE html><script src=".../mithril.min.js"></script><script src=".../app.js"></script> example) as well as building in page views similar to what you would have used KnockoutJS for.
With React you can use anything, it's the virtual DOM you return it cares about.