{"name":"react-addons-pure-render-mixin","version":"15.6.2","main":"index.js","repository":{"type":"git","url":"git+https://github.com/facebook/react.git"},"keywords":["react","react-addon"],"license":"MIT","dependencies":{"fbjs":"^0.8.4","object-assign":"^4.1.0"},"files":["LICENSE","README.md","index.js","react-addons-pure-render-mixin.js","react-addons-pure-render-mixin.min.js"],"scripts":{"test":"TEST_ENTRY=./index.js jest","build:dev":"NODE_ENV=development webpack && TEST_ENTRY=./react-addons-pure-render-mixin.js jest","build:prod":"NODE_ENV=production webpack && NODE_ENV=production TEST_ENTRY=./react-addons-pure-render-mixin.min.js jest","build":"npm run build:dev && npm run build:prod && node ../postbuild.js","prepublish":"npm test && npm run build"},"devDependencies":{"jest":"^19.0.2","react":"^15.4.2","react-dom":"^15.4.2","webpack":"^2.6.1"},"description":">**Note:** >This is a legacy React addon, and is no longer maintained. > >We don't encourage using it in new code, but it exists for backwards compatibility.   >The recommended migration path is to use [`React.PureComponent`](https://facebook.github.io/re","bugs":{"url":"https://github.com/facebook/react/issues"},"homepage":"https://github.com/facebook/react#readme","_id":"react-addons-pure-render-mixin@15.6.2","_shasum":"6b83f40b6b36ee40735cbd6125eb3f13ce1cddc9","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.0","_npmUser":{"name":"sophiebits","email":"npm@sophiebits.com"},"dist":{"shasum":"6b83f40b6b36ee40735cbd6125eb3f13ce1cddc9","tarball":"http://registry-npm.ywwl.com/react-addons-pure-render-mixin/download/react-addons-pure-render-mixin-15.6.2.tgz","integrity":"sha512-CZ0mZsOGtubv8377vcCW8Rhe0zZlMARLN/aT/xASHUll8cVhP9StTHnEzRBW+B8TBS2vvHYdqW3GfjFOS/mHHQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF4KcmyJoYhXKvJDUGqWk0a+CfzqqIU1BHRGRsb0sQUPAiBFNrmEivdrqRnFa+EjNvdouMkJztL8LUeG1+0Hcdg5+A=="}],"size":5437,"noattachment":false,"key":"/react-addons-pure-render-mixin/-/react-addons-pure-render-mixin-15.6.2.tgz"},"maintainers":[{"email":"npm2@sophiebits.com","name":"sophiebits"},{"email":"dg@domgan.com","name":"trueadm"},{"email":"dan.abramov@gmail.com","name":"gaearon"},{"email":"briandavidvaughn@gmail.com","name":"brianvaughn"},{"email":"opensource+npm@fb.com","name":"fb"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-addons-pure-render-mixin-15.6.2.tgz_1506385261515_0.9815313122235239"},"directories":{},"readme":"# react-addons-pure-render-mixin\n\n>**Note:**\n>This is a legacy React addon, and is no longer maintained.\n>\n>We don't encourage using it in new code, but it exists for backwards compatibility.  \n>The recommended migration path is to use [`React.PureComponent`](https://facebook.github.io/react/docs/react-api.html#react.purecomponent) instead.\n\n**Importing**\n\n```javascript\nimport PureRenderMixin from 'react-addons-pure-render-mixin'; // ES6\nvar PureRenderMixin = require('react-addons-pure-render-mixin'); // ES5 with npm\n```\n\nIf you prefer a `<script>` tag, you can get it from `React.addons.PureRenderMixin` with:\n\n```html\n<!-- development version -->\n<script src=\"https://unpkg.com/react-addons-pure-render-mixin/react-addons-pure-render-mixin.js\"></script>\n\n<!-- production version -->\n<script src=\"https://unpkg.com/react-addons-pure-render-mixin/react-addons-pure-render-mixin.min.js\"></script>\n```\n\nIn this case, make sure to put the `<script>` tag after React.\n\n## Overview\n\nIf your React component's render function renders the same result given the same props and state, you can use this mixin for a performance boost in some cases.\n\nExample:\n\n```js\nconst createReactClass = require('create-react-class');\n\ncreateReactClass({\n  mixins: [PureRenderMixin],\n\n  render: function() {\n    return <div className={this.props.className}>foo</div>;\n  }\n});\n```\n\nUnder the hood, the mixin implements [shouldComponentUpdate](https://facebook.github.io/react/docs/component-specs.html#updating-shouldcomponentupdate), in which it compares the current props and state with the next ones and returns `false` if the equalities pass.\n\n> Note:\n>\n> This only shallowly compares the objects. If these contain complex data structures, it may produce false-negatives for deeper differences. Only mix into components which have simple props and state, or use `forceUpdate()` when you know deep data structures have changed. Or, consider using [immutable objects](https://facebook.github.io/immutable-js/) to facilitate fast comparisons of nested data.\n>\n> Furthermore, `shouldComponentUpdate` skips updates for the whole component subtree. Make sure all the children components are also \"pure\".\n","publish_time":1506385261972,"_cnpm_publish_time":1506385261972,"dist-tags":{"15-next":"15.6.0-rc.0","dev":"15.5.0-rc.2","latest":"15.6.3"}}