./Mithril vs. React

posted by cli on

Mithril vs. React

Update When starting our web app, we were evaluating different frameworks. We have used AngularJS before and don’t like it, so we were looking something better. We are using React now and it was great, way better than AngularJS.

My choice: React.

React does NOT recommend to use mixins: > Mixins > Unfortunately, we will not launch any mixin support for ES6 classes in React. That would defeat the purpose of only using idiomatic JavaScript concepts.

There is no standard and universal way to define mixins in JavaScript. In fact, several features to support mixins were dropped from ES6 today. There are a lot of libraries with different semantics. We think that there should be one way of defining mixins that you can use for any JavaScript class. React just making another doesn’t help that effort.

Therefore, we will keep working with the larger JS community to create a standard for mixins. We will also start designing a new compositional API that will help make common tasks easier to do without mixins. E.g. first-class subscriptions to any kind of Flux store.

Luckily, if you want to keep using mixins, you can just keep using React.createClass.

When working with React, we should favor immutable.