kjda / ReactFlux

A library implementing React-Flux data flow design pattern + Code Generation
MIT License
66 stars 12 forks source link

Upgrade to Immutable.js 3 #16

Closed andrew-d closed 9 years ago

andrew-d commented 9 years ago

This upgrades to the latest version of Immutable.js. Thankfully, migrating was pretty simple - I only had to change one line.

coveralls commented 9 years ago

Coverage Status

Coverage remained the same at 98.77% when pulling f6c1198706527e85631d376794a5f2616c59e82a on andrew-d:andrew-support-immutable-3 into a90d6ad2f3625902938b0b844a1d105c58e6e98f on kjda:master.

coveralls commented 9 years ago

Coverage Status

Coverage remained the same at 98.77% when pulling f6c1198706527e85631d376794a5f2616c59e82a on andrew-d:andrew-support-immutable-3 into a90d6ad2f3625902938b0b844a1d105c58e6e98f on kjda:master.

andrew-d commented 9 years ago

Worth noting: I just tried using this in the browser, and I get this traceback from Immutable.js:

 iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. Error
    at Map.Object.defineProperty.get (webpack:///./~/immutable/dist/immutable.js?:4539:21)
    at isArray (webpack:///./~/react-flux/~/lodash-node/modern/objects/isArray.js?:41:59)
    at baseMerge (webpack:///./~/react-flux/~/lodash-node/modern/internals/baseMerge.js?:26:4)
    at merge (webpack:///./~/react-flux/~/lodash-node/modern/objects/merge.js?:90:30)
    at eval (webpack:///./~/react-flux/lib/store.js?:263:18)
    at forEach (webpack:///./~/react-flux/~/lodash-node/modern/collections/forEach.js?:45:11)
    at Object.Store.getInitialState (webpack:///./~/react-flux/lib/store.js?:262:16)
    at Object.Store._setInitialState (webpack:///./~/react-flux/lib/store.js?:251:23)
    at Object.Store (webpack:///./~/react-flux/lib/store.js?:31:7)
    at Object.module.exports.createStore (webpack:///./~/react-flux/lib/index.js?:27:10)

Looks like the error is coming from here, and is being triggered when I have a getInitialState() that looks like this:

  getInitialState: function() {
    return {
      someKey: Immutable.Map(),
    };
  },

Any thoughts on what a fix could be?

mrtnbroder commented 9 years ago

I guess this can be closed as soon as #22 is merged in.

kjda commented 9 years ago

:thumbsup: