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

feat: add useTimer #2626

Closed
wants to merge 1 commit into from
Closed

feat: add useTimer #2626

wants to merge 1 commit into from

Conversation

jacksyk
Copy link

@jacksyk jacksyk commented Aug 10, 2024

add useTimer hooks

@CLAassistant
Copy link

CLAassistant commented Aug 10, 2024

CLA assistant check
All committers have signed the CLA.

@jacksyk jacksyk mentioned this pull request Aug 10, 2024
@crazylxr
Copy link
Collaborator

crazylxr commented Sep 26, 2024

很好的一个 hook,这个 hook 的发布,意味着,useCountDown 就可以不需要,这将是一个 breakchange,所以我建议把这个放到 v4 分支进行发布,所以你看看你重新提一个 pr ,不要合到 master 了,合到 v4 分支

@crazylxr crazylxr added the v4 label Sep 26, 2024
@jacksyk
Copy link
Author

jacksyk commented Sep 26, 2024

好的

@jacksyk jacksyk changed the base branch from master to v4 September 26, 2024 06:40
@crazylxr
Copy link
Collaborator

interval 这个属性 useCountDown 是有的,这个没了,也需要补一下

@jacksyk jacksyk changed the base branch from v4 to master September 26, 2024 06:54
@jacksyk
Copy link
Author

jacksyk commented Oct 27, 2024

这个不好支持吧?为了达到精准性,目前这个hooks用的REA的回调去执行,也就意味着每一次重绘之前都会set一下,设置了interval只能去控制渲染时机了,这样又会失去hooks的精准性

@jacksyk jacksyk closed this Oct 27, 2024
@jacksyk jacksyk deleted the feat/useTimer branch October 27, 2024 09:18
@jacksyk
Copy link
Author

jacksyk commented Oct 27, 2024

新pr #2662

@jacksyk jacksyk mentioned this pull request Oct 27, 2024
@jacksyk
Copy link
Author

jacksyk commented Oct 27, 2024

感觉用到的interval场景应该对时间要求也不高,这个hooks的主要目的还是为了实现一个精准性问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants