{"name":"react-addons-pure-render-mixin","version":"0.14.0","main":"index.js","license":"BSD-3-Clause","peerDependencies":{"react":"^0.14.0"},"description":"This package provides the React PureRenderMixin add-on. See http://facebook.github.io/react/docs/addons.html for more information.","_id":"react-addons-pure-render-mixin@0.14.0","_shasum":"f2af4f37a0fb18d3935f76bb731bc7e8524612d3","_resolved":"file:build/packages/react-addons-pure-render-mixin.tgz","_from":"build/packages/react-addons-pure-render-mixin.tgz","scripts":{},"_npmVersion":"2.14.3","_nodeVersion":"4.1.0","_npmUser":{"name":"zpao","email":"paul@oshannessy.com"},"maintainers":[{"name":"spicyj","email":"ben@benalpert.com"},{"name":"zpao","email":"paul@oshannessy.com"}],"dist":{"shasum":"f2af4f37a0fb18d3935f76bb731bc7e8524612d3","tarball":"http://registry-npm.ywwl.com/react-addons-pure-render-mixin/download/react-addons-pure-render-mixin-0.14.0.tgz","integrity":"sha512-v1qjLOw3KEmiWNt4D0R3qk+fPMjCotTiq7oC+O5D9oTVdoTxFunyyZhAt7E83T5YS9e+gKAo3xqHDULAy4DDRQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCY5/xxnzKLm1fkkuFBGNCDu7X5QtQLLMuy8yW8NpnZgAIhAPY/aqWlKkc1Eomjn2PKEmYZf2GNBb7dvk6Jh52/RhqX"}],"size":2671,"noattachment":false,"key":"/react-addons-pure-render-mixin/-/react-addons-pure-render-mixin-0.14.0.tgz"},"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":1444239020316,"_cnpm_publish_time":1444239020316,"dist-tags":{"15-next":"15.6.0-rc.0","dev":"15.5.0-rc.2","latest":"15.6.3"}}