v2.0.1
Breaking changes
- No longer build as UMD, now packaged is a regular common-js module and the es6 module.
- This version is using getIn, so minimal required version of
Immutable.js
is nowv4
New API
- We can pass paths to
updateOnProps
andupdateOnStates
which allows to be even more specific on what triggers an update. Now it viable to pass single aggregated object as a property and update only when value under specific path changes, and it works for plain js as well as immutable data structures.
class Example extends ImmutablePureComponent {
updateOnProps = [
['data', 'value'],
['data', 'state']
];
render() {...}
}
This way we don't have to split data
to separate props for each child component:
items = [{ value: 'Item', status: 'new', timestamp: 123123123, lastUpdateDate: 123123123}, ...]
items.map(item => <Example data={item} />)
New example
Previous example was a little be enigmatic, this time new example allows to modify the code and explore for your self what its all about. check here