-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
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
useDerivedState支持传入自定义props对比方法 #75
Comments
这个功能现在是用
|
emm, 但是当props为非primitive的值时,还是会一直触发这个compute不是,触发下面两次setState,但是实际上是想说props是没变的。不一定是默认值,默认值可以memo或者提到constant去来解决。 |
因为React在 我感觉你更需要 |
了解 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
目前的实现方式如下:
这样的话当是非primitive的值对比时,是一直不等的。
是否可以添加支持传入
propCompare
函数,支持用户自定义对比方式?The text was updated successfully, but these errors were encountered: