{"name":"react-addons-pure-render-mixin","version":"15.4.0-rc.3","main":"index.js","repository":{"type":"git","url":"git+https://github.com/facebook/react.git"},"keywords":["react","react-addon"],"license":"BSD-3-Clause","dependencies":{},"peerDependencies":{"react":"^15.4.0-rc.3"},"files":["LICENSE","PATENTS","README.md","index.js"],"description":"This package provides the React PureRenderMixin add-on.","bugs":{"url":"https://github.com/facebook/react/issues"},"homepage":"https://github.com/facebook/react#readme","_id":"react-addons-pure-render-mixin@15.4.0-rc.3","_shasum":"37bd4bf9029f37c3c2f4eb019f4ef602b682390f","_resolved":"file:packages/react-addons-pure-render-mixin.tgz","_from":"packages/react-addons-pure-render-mixin.tgz","scripts":{},"_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"gaearon","email":"dan.abramov@gmail.com"},"dist":{"shasum":"37bd4bf9029f37c3c2f4eb019f4ef602b682390f","tarball":"http://registry-npm.ywwl.com/react-addons-pure-render-mixin/download/react-addons-pure-render-mixin-15.4.0-rc.3.tgz","integrity":"sha512-hQXCWRmvnGxAH1voMhJc6HkIFcBJAGn5rThdkl3ZNKtJD+5sC7fppckQMO4ICKrkVdPhiJDIN6nAfEX26qUkOA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDipI0VRHQCjdyubE5bxtIC7L+ecwO/bi/h/eeOSHlCSQIhAJ3Pb2nrWawbiC0z9AgziXXd2FoKfVbI8cVfUjc6msMp"}],"size":2802,"noattachment":false,"key":"/react-addons-pure-render-mixin/-/react-addons-pure-render-mixin-15.4.0-rc.3.tgz"},"maintainers":[{"name":"fb","email":"opensource+npm@fb.com"},{"name":"gaearon","email":"dan.abramov@gmail.com"},{"name":"graue","email":"scott@oceanbase.org"},{"name":"sebmarkbage","email":"sebastian@calyptus.eu"},{"name":"spicyj","email":"ben@benalpert.com"},{"name":"zpao","email":"paul@oshannessy.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/react-addons-pure-render-mixin-15.4.0-rc.3.tgz_1476472420063_0.4759393164422363"},"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":1476472422078,"_cnpm_publish_time":1476472422078,"dist-tags":{"15-next":"15.6.0-rc.0","dev":"15.5.0-rc.2","latest":"15.6.3"}}