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

refactor(useMap/useSet): refactoring useMap and useSet for improved initialValue checking. #2116

Merged
merged 4 commits into from Mar 23, 2023

Conversation

KangXinzhi
Copy link
Contributor

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

I refactored the useMap and useSet methods because the return value of new Map(undefined) is equivalent to new Map(), and the return value of new Set(undefined) is equivalent to new Set(). Therefore, I refactored the initial value checking logic in both methods.

📝 Changelog

Language Changelog
🇺🇸 English refactoring useMap and useSet for improved initialValue checking
🇨🇳 Chinese useMap 和 useSet 方法中改进初始值检查

☑️ 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

@KangXinzhi KangXinzhi changed the title fix(useMap/useSet): refactoring useMap and useSet for improved initialValue checking. refactor(useMap/useSet): refactoring useMap and useSet for improved initialValue checking. Mar 13, 2023
@crazylxr crazylxr merged commit b72366e into alibaba:master Mar 23, 2023
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

4 participants