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
shouldUpdate是React shouldUpdate的高阶函数包装,用法同https://reactjs.org/docs/react-component.html#shouldcomponentupdate一样。
shouldUpdate
React shouldUpdate
shouldUpdate( test: (props: Object, nextProps: Object) => boolean ): HigherOrderComponent
const Foo = compose( pure, shouldUpdate((props, nextProps) => props.title !== nextProps.title) , )(({ title }) => ( <div>{console.log('render')}{title}</div> ))
在codepen在线预览
The text was updated successfully, but these errors were encountered:
No branches or pull requests
shouldUpdate 介绍
shouldUpdate
是React shouldUpdate
的高阶函数包装,用法同https://reactjs.org/docs/react-component.html#shouldcomponentupdate一样。shouldUpdate Flow Type
shouldUpdate 例子
在线DEMO
在codepen在线预览
The text was updated successfully, but these errors were encountered: