We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Immutable 详解及 React 中实践 Immutable.js 以及在 react+redux 项目中的实践 這篇文章提到 immitable js 与 React 搭配使用,Pure Render 在 shouldComponentUpdate() 做了些 render 優化 先記下來
import { is } from 'immutable'; shouldComponentUpdate: (nextProps = {}, nextState = {}) => { const thisProps = this.props || {}, thisState = this.state || {}; if (Object.keys(thisProps).length !== Object.keys(nextProps).length || Object.keys(thisState).length !== Object.keys(nextState).length) { return true; } for (const key in nextProps) { if (!is(thisProps[key], nextProps[key])) { return true; } } for (const key in nextState) { if (thisState[key] !== nextState[key] && !is(thisState[key], nextState[key])) { return true; } } return false; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Immutable 详解及 React 中实践
Immutable.js 以及在 react+redux 项目中的实践
這篇文章提到 immitable js 与 React 搭配使用,Pure Render
在 shouldComponentUpdate() 做了些 render 優化
先記下來
The text was updated successfully, but these errors were encountered: