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: 优化useGetState #2417

Closed
wants to merge 1 commit into from
Closed

Conversation

jiqishoubi
Copy link

perf: 原useGetState必须在一次渲染后才能给stateRef附上最新的state值。修改后,可以在setState之后立即获取到最新的stateRef。使用方法不变,增加了demo2

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

@CLAassistant
Copy link

CLAassistant commented Dec 22, 2023

CLA assistant check
All committers have signed the CLA.

@liuyib
Copy link
Collaborator

liuyib commented Dec 26, 2023

已有实现: #2348, 不再接受新的重复的 PR 了,抱歉。
目前 useGetState 的行为变更属于破坏性更改,v3 版本不会变更的,要么 v4 引入新 hook,要么 v4 来做破坏性更改。后续请关注 #2348

@liuyib liuyib closed this Dec 26, 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.

3 participants