andreypopp/react-async — pull request #26 by eliseumds (2014-08-08 20:57:46+00:00)
Title: Optional promise in getInitialStateAsync

Resolves #23.

```javascript
getInitialStateAsync: function() {
return myPromise; // the state will merge the resolved object
}
```

Need a custom state key?

```javascript
getInitialStateAsync: function() {
return myPromise.then(function(value) {
return {
customKey: value
};
});
},
render: function() {
return React.DOM.div(null, this.state.customKey.propA);
}
```

The node-style callback still exists.