{"bugs":{"url":"https://github.com/Monar/react-immutable-pure-component/issues"},"dist":{"shasum":"a5866a676f33a4b9b6b0d0c1ccd34bc0b467de4a","tarball":"https://registry.npmjs.org/react-immutable-pure-component/-/react-immutable-pure-component-2.2.0-rc.3.tgz","fileCount":8,"integrity":"sha512-Enkug+ibj7JgQDT+8ZxwThxCk6bh9HVHp6uTEQTJlhvWyGE7fdhnB5WyxQDgX90H0GHTcVifzjCkhsmuejgdrg==","signatures":[{"sig":"MEQCICRPYc/WTf7SvD+40Q1fr2fwavdaiCdAJbi+laQbO6abAiBm2giWbWPHZqOtAAVIc2HXQr4THfY1hvf4/VSevBvSgQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18907,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcabkRCRA9TVsSAnZWagAAs7cP/ijGwohVZodOBX2QY5gA\nbWRWb92GA+fRUqe44e59yNAr3jY/SGomvIxtGUcbY+LOjYXBx6kWfg1HW3FU\nMczEck2lY6D8v7zP+8DmS9tcl5lgq+XWcn+f/0aSqSaZHQS6QlMRAPa8vkfB\nikQarjzqB2aUSjJcXNd4bkLLe/tn7yPUkEi0k7ydq2NrFG2uTPnsJXPNZSbo\nGjdjUxQbowCt5227+zGTCzuh/aDwVvtNhcyo32Hp0doSJLNGnxEIr9cGuHKO\nNu7lDM8QcCaHgALyPCQC2cBSqkVI0IbPSMwd6XxEVLFIK/BmKLDAXlsEw0pR\nIoNI/dCYl+gBA76V6kQPafQ1mtHH5xRphTu4tQvpyDup7kIyx3ce1XQyMYGy\nZ1AaJcyUEdd5CfjDa+cfQesbnw3MA37uPBNXnSGvDsq7HQsQp90jrycpm5jQ\nJTIgIUcHOcdV3hB3UwhI2kma2rf+xWxzu99HxvpO5PtD4Rt0li5N0AwDReVm\nnrS9AS7Y11Z1PeLUuYjJwVIrWddgr0yVq2CQMh7Zr0MgWfx5ySFn2qtYB9sJ\nJJqPv0Al37eVYmwrn43rIb+4rTQ7RhGRHMV8YqmZ7JepbYas8uL9aTTUcfd1\nbeszamsOxpIzmdXXrxTE1neSDUQGchOt+4J//LHh4j0lXEzwhLIPs0TxIOep\nuGGk\r\n=p1Ky\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/react-immutable-pure-component.js","name":"react-immutable-pure-component","types":"types/react-immutable-pure-component.d.ts","author":{"name":"Piotr Tomasz Monarski"},"module":"lib/react-immutable-pure-component.es.js","readme":"[![npm version](https://badge.fury.io/js/react-immutable-pure-component.svg)](https://badge.fury.io/js/react-immutable-pure-component)\n\n# ImmutablePureComponent\n\nUnfortunately `React.PureComponent` is not embracing `Immutable.js` to it full\npotential. While `Immutable.js` provides [hash value](https://facebook.github.io/immutable-js/docs/#/ValueObject/hashCode),\nwitch allows for fast comparison of two different instances\n`React.PureComonent` is only comparing addresses of those instances.\n\nThe `ImmutablePureComponent` uses\n[is](https://facebook.github.io/immutable-js/docs/#/is) to compare values and\nextends component functionality by introducing:\n* `updateOnProps`\n* `updateOnStates`\n\nWith those properties you can specify list of props or states that will be\nchecked for changes. If value is `undefined` (default) then all `props` and\n`state` will be checked, otherwise array of keys or paths is expected. The path\nis an iterator (eg. Array) of keys like in the example below. Checking values\nunder path is working for `Immutable` data structures as well as for plain js\ndata structures. To benefit from this feature `immutable@4` is required\notherwise non `string` values will throw a `TypeError`.\n\nUnder the hood version 2 is 'optionally' using\n[getIn](https://facebook.github.io/immutable-js/docs/#/getIn) which is new\naddition to `Immutable@4` and all non `string` values are passed as an argument\nto `Immutable.getIn`.\n\n### Example\nIn this example component will update when value of `me` is change and will\nignore changes of `data`, `check` or any other property. Component will also\nupdate on change of first element of `buzz` or change to `type` and will ignore\nchanges to the rest of the state. \n\n```js\nclass Example extends ImmutablePureComponent {\n  state = {\n    fis: { \n      buzz: [10, 11]\n      ignore: 'this',\n    },\n    type: undefined,\n  };\n\n  updateOnStates = [\n    ['fis', 'buzz', 0],\n    'type',\n  ];\n\n  updateOnProps = [\n    ['data', 'check', 'me'],\n  ];\n\n  render() {...}\n}\n\nlet data = Immutable.fromJS({ check: { me: true } })\n\nReactDOM.render(<Example data={data} onChange={() => {}}, root);\n```\n\nTo check what its all about checkout the interactive example :D\n### [Interactive example](https://codesandbox.io/s/github/Monar/react-immutable-pure-component/tree/master/example).\n","gitHead":"1925f8203e9f6297599fdfb03a531ba79bec474a","license":"MIT","scripts":{"lint":"eslint .","test":"jest","build":"rollup -c ./rollup.config.js","lint:fix":"eslint --fix .","testAndBuild":"yarn test; yarn lint; yarn build","prepublishOnly":"publish-please guard","publish-please":"publish-please"},"_npmUser":{"name":"mastermonar","email":"dev@monarski.pl"},"homepage":"https://github.com/Monar/react-immutable-pure-component#readme","keywords":["react","memo","immutable","pure","component","PureComponent"],"repository":{"url":"git+https://github.com/Monar/react-immutable-pure-component.git","type":"git"},"_npmVersion":"6.5.0","description":"React PureComponent implementation embracing Immutable.js","directories":{},"maintainers":[{"name":"mastermonar","email":"dev@monarski.pl"}],"_nodeVersion":"11.9.0","dependencies":{"@types/react":"*"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"24.1.0","react":"16.8.2","enzyme":"3.9.0","eslint":"5.14.0","rollup":"1.2.1","prettier":"1.16.4","immutable":"4.0.0-rc.12","react-dom":"16.8.2","babel-core":"7.0.0-bridge.0","babel-jest":"24.1.0","@babel/core":"7.3.3","babel-eslint":"10.0.1","publish-please":"5.4.3","@babel/preset-env":"7.3.1","rollup-plugin-copy":"0.2.3","@babel/preset-react":"7.0.0","eslint-config-monar":"1.0.2","eslint-plugin-babel":"5.3.0","eslint-plugin-react":"7.12.4","react-test-renderer":"16.8.2","rollup-plugin-babel":"4.3.2","eslint-plugin-import":"2.16.0","eslint-config-prettier":"4.0.0","eslint-plugin-flowtype":"3.4.2","eslint-plugin-prettier":"3.0.1","enzyme-adapter-react-16":"1.9.1","@babel/plugin-transform-object-assign":"7.2.0"},"peerDependencies":{"react":">= 16.6","immutable":">= 2 || >= 4.0.0-rc","react-dom":">= 16.6"},"optionalDependencies":{"@types/react":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-immutable-pure-component_2.2.0-rc.3_1550432528850_0.48219455055233795","host":"s3://npm-registry-packages"},"_id":"react-immutable-pure-component@2.2.0-rc.3","version":"2.2.0-rc.3"}