{"bugs":{"url":"https://github.com/Monar/react-immutable-pure-component/issues"},"dist":{"shasum":"b98648e77115350ba28c916ba5c3f69850c1dc72","tarball":"https://registry.npmjs.org/react-immutable-pure-component/-/react-immutable-pure-component-2.2.0-rc.0.tgz","fileCount":7,"integrity":"sha512-EjYUjB74lleUONG5ry80OC8QckepZCDAPEnbiFJT2czX0KsbIMFl/a8I1vHHntkN0D7tPwcKatAgrWcO/VL4UA==","signatures":[{"sig":"MEUCIAzI8omMOcvuIvPZj6pgKpQebK5PvVWc0bRdCuW5MCIKAiEA7sPMByvQC9mzcI0sQeIodIoB2i4UqTq6U6eU9CxfeSg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16316,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUjhiCRA9TVsSAnZWagAApuUP/3Htw6YRqRQBhOxgIOnU\n/vNrTRXmVB3ATUKdVePvUt+bEvBKJGx+nRFNbMw23dcle25jiQE1T+X3oqR4\na6tkNGmdb0B95dB/xmzB72ILg3b+8pr/0ON3B79Ja+rhH/XVc/scScJZPfu7\n0VrDG9hFTORD53F9bIOlhGPfvLPUXaEMdf+QNvrfW5acgALF39E7T1T63m9o\nZKIieDsHSuIHRuXCUNnv0o5u/rn+Kh476O8q9h+wdWhZWtEfZsDv4RSLJhsk\n6K6Xb4GwqCyRKUUsHluRavrPTbkMiDfrmhP6QpER2fB5r3Vfb14iWeef6zGS\nehuFyKIF6dlUfCV+VX5Nodnqwr/AcfTo9i7vrkK/BNnuzLOmGZPBhlImqyhV\nr9IQAsn7QnBnDrv03oFn9Rl2Fr2kwgBC42Q/O4jANpzb/6KQHEXC0NR7B8xA\nWHrD7c4h3NuskpL7lYDB1D1anGR9UR4oKIBl1e+QW+N0G5FDMyIuSy4bSLgV\nLlEsNCctjgzy9TsLumZl6kSY1AAqAQJhtkap/z380s/kW4+w9oYR7/SeG2Pu\nrsFrzk6QRy4Jz5NNMe0rv5F0dwh4NyzD70C7EJArfBmaf6j81qr1RYQCjOOp\nDoxGDp078gas4VI8t7sm18tdQSy+cK3BZz9ttGmMG6SCA9gL+agl7DRATCfR\nDc8m\r\n=BY2S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/react-immutable-pure-component.cjs.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.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":"43bdce419d6e748a029a0235ae00cc6c490d6c67","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.4.1","description":"React PureComponent implementation embracing Immutable.js","directories":{},"maintainers":[{"name":"mastermonar","email":"dev@monarski.pl"}],"_nodeVersion":"11.1.0","dependencies":{"@types/react":"*"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"23.6.0","react":"16.7.0","enzyme":"3.8.0","eslint":"5.12.0","rollup":"1.1.0","prettier":"1.15.3","immutable":"4.0.0-rc.12","react-dom":"16.7.0","babel-core":"7.0.0-bridge.0","babel-jest":"23.6.0","@babel/core":"7.2.2","babel-eslint":"10.0.1","publish-please":"5.4.3","@babel/preset-env":"7.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.7.0","rollup-plugin-babel":"4.3.0","eslint-plugin-import":"2.14.0","eslint-config-prettier":"3.5.0","eslint-plugin-flowtype":"3.2.1","eslint-plugin-prettier":"3.0.1","enzyme-adapter-react-16":"1.7.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.0_1548892257703_0.18157377280457898","host":"s3://npm-registry-packages"},"_id":"react-immutable-pure-component@2.2.0-rc.0","version":"2.2.0-rc.0"}