Skip to content

v2.0.1

Compare
Choose a tag to compare
@Monar Monar released this 31 Dec 15:48
· 21 commits to master since this release
5f283ab

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 now v4

New API

  • We can pass paths to updateOnProps and updateOnStates 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