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 memoized fn in useTimeout #2092

Merged
merged 1 commit into from Mar 6, 2023
Merged

fix: use memoized fn in useTimeout #2092

merged 1 commit into from Mar 6, 2023

Conversation

li-jia-nan
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

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English fix: use memoized fn in useTimeout
🇨🇳 Chinese fix: 修复了打开 react devtools 时 useTimeout 不工作的问题

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

@liuyib
Copy link
Collaborator

liuyib commented Mar 3, 2023

useRafTimeout、useRafInterval 中也有类似的用法,是不是也需要测下?然后一起改了? @li-jia-nan

@li-jia-nan
Copy link
Collaborator Author

我的建议是先把两个定时器改了,其它的有了 issue 再说,毕竟这个只在 react devtool 中才会出现,影响范围不是很大

@liuyib
Copy link
Collaborator

liuyib commented Mar 3, 2023

我的建议是先把两个定时器改了,其它的有了 issue 再说,毕竟这个只在 react devtool 中才会出现,影响范围不是很大

可以,我先记录下来,优先级降低,有空了测一测

@liuyib
Copy link
Collaborator

liuyib commented Mar 4, 2023

@crazylxr ready for review

@crazylxr crazylxr merged commit 5b5f64f into master Mar 6, 2023
@crazylxr crazylxr deleted the useTimeout branch March 6, 2023 11:16
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

3 participants