Skip to content

Releases: Monar/react-immutable-pure-component

v2.2.2

06 Nov 22:54
Compare
Choose a tag to compare
  • drop redundant optional dependency
  • update packages
  • fix typescript typing

v2.2.1

19 Feb 20:11
Compare
Choose a tag to compare
  • Update README.md

v2.2.0

19 Feb 20:04
Compare
Choose a tag to compare

New additions

  • add flow typing
  • add immutableMemo a wrapper over React.memo with updateOnProps functionality and is compare.

Changes (non breaking)

  • update typescript typing
  • remove usage of getIn due to this issue.
    • New implementation removes limitation of path functionality available only with immutable@4, now updateOnPros and updateOnStates work with paths regardless of immutable version.
    • New implementation additionally work with es6 Map or any collection providing get(key) and has(key) functionality.

v2.1.0

01 Jan 22:33
Compare
Choose a tag to compare

Change peerDependency limit

  • With only string values in updateOnProps and updateOnStates no longer immutable@4 is 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

31 Dec 15:48
5f283ab
Compare
Choose a tag to compare

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

v1.2.3

03 Aug 12:35
Compare
Choose a tag to compare
  • Loosen peerDependencies
  • Add @types/react as optionalDependency
  • Update/Fix typescript type definition

v1.2.2

27 Jun 08:37
Compare
Choose a tag to compare

v1.2.1

26 Jun 11:17
Compare
Choose a tag to compare
  • Improve typing of updateOnProps and updateOnStates:

v1.2.0

15 Jun 08:07
Compare
Choose a tag to compare
  • Build and exported as umd as well as es-module

v1.1.2

14 Jun 15:27
Compare
Choose a tag to compare
  • Add type definition for typescript