Mastering Immutable.js
上QQ阅读APP看书,第一时间看更新

Parsing JavaScript objects

You can parse a regular JavaScript object, resulting in a map:

const myMap = fromJS({
one: 1,
two: 2,
three: 3
});
console.log('myMap', myMap.get('one'));
// -> myMap 1

Once again, this is just like passing the object literal to the Map constructor.