flux-react-router-example icon indicating copy to clipboard operation
flux-react-router-example copied to clipboard

Object is not a hash

Open gaearon opened this issue 11 years ago • 3 comments

An object is not a hash.

Currently example fails with usernames such as constructor.

We solve this partially with https://github.com/gaearon/flux-react-router-example/commit/487745ffe9eddc06cf37001ecd6c9735c0d640b2 but the same needs to be done for RepoStore and UserStore. The easiest way to do this is to create a Bag class and use it instead of mergeIntoBag, isInBag helpers. Inside Bag, we will use prefixes for IDs.

gaearon avatar Jan 28 '15 15:01 gaearon

Could ES6 Maps be used for this instead?

JakeChampion avatar May 05 '15 10:05 JakeChampion

Yes but they're not really there yet. I don't know much about the polyfill though.

gaearon avatar May 05 '15 10:05 gaearon

Kangax's ES6 compat table shows that Babel passes all the Map tests. The polyfill is a part of core-js.

JakeChampion avatar May 05 '15 12:05 JakeChampion