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: optimize useSetState ts #1390

Merged
merged 2 commits into from
Dec 21, 2021
Merged

fix: optimize useSetState ts #1390

merged 2 commits into from
Dec 21, 2021

Conversation

brickspert
Copy link
Collaborator

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

#1386

💡 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

Copy link
Collaborator

@awmleer awmleer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@awmleer awmleer merged commit 514456b into master Dec 21, 2021
@awmleer awmleer deleted the ts/use-set-state branch December 21, 2021 06:11
@hemengke1997
Copy link
Contributor

作者你好,这个ts的修改 导致的用户端需要修改的代码很多。之前是依赖useSetState中的partial做类型可选,现在都得自己加partial了,还必须加初始值, 最少也是个空对象

@brickspert
Copy link
Collaborator Author

作者你好,这个ts的修改 导致的用户端需要修改的代码很多。之前是依赖useSetState中的partial做类型可选,现在都得自己加partial了,还必须加初始值, 最少也是个空对象

确实会对已有业务造成影响,但这次的变更的 ts 类型更严谨了,之前版本的 ts 类型不安全。🙏

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.

3 participants