Skip to content
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

fix: use Object.is to judge two value isChange #1627

Merged
merged 2 commits into from
May 16, 2022

Conversation

hchlq
Copy link
Collaborator

@hchlq hchlq commented May 14, 2022

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@hchlq
Copy link
Collaborator Author

hchlq commented May 14, 2022

  1. 解决了 useWhyDidYouUpdate 判断前后两个值都是NaN的情况
  2. 解决了 useTrackedEffect 判断前后两个值都是NaN的情况
  3. 抽取判断两个值是否相等的 hasChange 帮助方法,内部使用Object.is来判断

@hchlq hchlq force-pushed the hotfix/hasChange branch from 0ecb803 to cb06410 Compare May 15, 2022 09:21
@brickspert brickspert merged commit 6024d66 into alibaba:master May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants