Releases: Monar/react-immutable-pure-component
Releases · Monar/react-immutable-pure-component
v2.2.2
v2.2.1
v2.2.0
New additions
- add flow typing
- add
immutableMemoa wrapper overReact.memowithupdateOnPropsfunctionality and is compare.
Changes (non breaking)
- update typescript typing
- remove usage of getIn due to this issue.
- New implementation removes limitation of
pathfunctionality available only withimmutable@4, nowupdateOnProsandupdateOnStateswork with paths regardless ofimmutableversion. - New implementation additionally work with es6 Map or any collection providing
get(key)andhas(key)functionality.
- New implementation removes limitation of
v2.1.0
Change peerDependency limit
- With only
stringvalues inupdateOnPropsandupdateOnStatesno longerimmutable@4is required.
Version v2.0.1 introduced minimal immutable version to >= 4, with this release this limitation is removed. Now everything will work exactly the same way in react-immutable-pure-component@1 with immutable@<4. In case when value other then string is in updateOnProps or updateOnStates the TypeError will be thrown.
Nothing changes regarding new 'path api' for immutable >= 4
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.jsis nowv4
New API
- We can pass paths to
updateOnPropsandupdateOnStateswhich 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
v1.2.3
v1.2.2
- Accept Immutable@4.0.0-rc.*