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

perf(useMap): reduce re-render #2388

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

GetWebHB
Copy link
Contributor

@GetWebHB GetWebHB commented Dec 2, 2023

[中文版模板 / 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

@GetWebHB
Copy link
Contributor Author

另外向reset这种,大部分都没有考虑随机数的情况,统一处理下不?如果要的话我整理一起弄下

@liuyib liuyib changed the title perf(useMap): remove 不存在的key,禁止重新渲染 perf(useMap): reduce re-render Apr 25, 2024
@liuyib
Copy link
Collaborator

liuyib commented Apr 25, 2024

另外向reset这种,大部分都没有考虑随机数的情况,统一处理下不?如果要的话我整理一起弄下

意思是现在 initialValue 传随机值的话,reset 会有问题是吗?

@GetWebHB
Copy link
Contributor Author

GetWebHB commented Apr 25, 2024

另外向reset这种,大部分都没有考虑随机数的情况,统一处理下不?如果要的话我整理一起弄下

意思是现在 initialValue 传随机值的话,reset 会有问题是吗?

是的,useSet/useMap等 初始值都存在随机数问题

@liuyib
Copy link
Collaborator

liuyib commented Apr 25, 2024

useSet/useMap 都存随机数问题 reset,没有单独处理过的 应该都存在

可以测试下。如果确实有问题,辛苦开个新的 PR 处理下哈~

另外,看下这个 PR 是否需要补单测,应该是需要的。多谢

@GetWebHB
Copy link
Contributor Author

useSet/useMap 都存随机数问题 reset,没有单独处理过的 应该都存在

可以测试下。如果确实有问题,辛苦开个新的 PR 处理下哈~

另外,看下这个 PR 是否需要补单测,应该是需要的。多谢

Done!

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.

None yet

2 participants