Also, since I’m using React, should I stop using this format:
Thing = React.createClass({
// ...
});
in favor of:
export default class Thing extends React.Component {
// ...
}
The official React docs still use the former, so I’m not sure which direction people are generally moving towards. My gut says probably the latter, though.
Also, since I’m using React, should I stop using this format:
Thing = React.createClass({
// ...
});
in favor of:
export default class Thing extends React.Component {
// ...
}
I would try and use the stateless component as much as possible. If you need the mixin support that's fine, but for the ones that only use props the stateless are really nice! Otherwise @abhiaiyer 's method works nicely!
In react-komposer you compose a new React container and pass data via props to the UI components.
It also does does some cool stuff for you like loading indicators and so on.
On the other hand getMeteorData is mixin and you can manage the state inside a React component. Usually, you need to call another UI component from it.
react-komposer makes it easy to write tests and so on, because you just need to work composer function and tell how to load data.