firebase/reactfire — pull request #30 by JustinTulloss (2014-12-28 23:12:57+00:00)
Title: [WIP] Immutable.js Support

I don't want to merge this patch as-is, but if something like this looks reasonable, I'd like to adapt this patch to provide a parallel API that works if [Immutable.js](http://facebook.github.io/immutable-js/) is present in the environment. Maybe `bindAsList` and `bindAsOrderedMap` would come into existence next to the existing bind functions if Immutable.js was present.

### Summary

ReactFireMixin can be rather slow with many items causing many change
events which can trigger many rerenders. By using Immutable data
structures we can cheaply check the entire tree and only rerender the
components that have actually changed their data.

This patch makes `bindAsObject` bind an Immutable.OrderedMap to the specified
prop and `bindAsArray` bind an Immutable.List to the specified prop.

It also changes the tests to verify that the data returned is correct.

Finally, the patch adds a `boundVarsHaveUpdated` method that will
cheaply check for changed state in the bound state variables. It's
intended to be used in a more complex `shouldComponentUpdate` method.
Tests for the new method are added.