firebase/reactfire — pull request #29 by krawaller (2014-12-17 12:42:33+00:00)
Title: added static versions of bindAsArray and bindAsObject

This PR employs a [mixin factory pattern](http://blog.krawaller.se/posts/reflux-refinement/) to make a static version of `bindAsArray` and `bindAsObject`.

Instead of doing this...

```javascript
var ExampleComponent = React.createClass({
mixins: [ReactFireMixin],
componentWillMount: function(){
this.bindAsArray(firebaseRef,"propname",this.cancel);
}
});
```

...you can simply do this:

```javascript
var ExampleComponent = React.createClass({
mixins: [ReactFireMixin.bindAsArray(firebaseRef,"propname","cancel")],
});
```
The static versions will then set up the `componentWillMount` method for you automatically.

To harmonise with not being able to supply `this.cancel` in the static method (since `this` doesn't point to the instance at that point in time) I made all versions also work with a string as a cancel argument, which is then assumed to be the name of a method on the instance.