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

Records

A record is closer to a JavaScript object than to an Immutable.js map. The idea here is that records have a predetermined set of allowable string keys, which can specify default values when not provided:

const MyRecord = Record({});
const myRecord = new MyRecord();
console.log('Record', myRecord instanceof Record);
// -> Record true