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

Interval hook can create two instances of the timer #2093

Closed
melloware opened this issue Aug 12, 2022 · 0 comments · Fixed by #2094
Closed

Interval hook can create two instances of the timer #2093

melloware opened this issue Aug 12, 2022 · 0 comments · Fixed by #2094
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@melloware
Copy link
Contributor

What package has an issue

@mantine/hooks

Describe the bug

In some cases the Interval hook is firing the timer twice depending on how the component using it is being created.

Related to #782 and specifically this fix: #1498

cc @prograpp

What version of @mantine/hooks page do you have in package.json?

5.1.1

If possible, please include a link to a codesandbox with the reproduced problem

No response

Do you know how to fix the issue

Yes

Are you willing to participate in fixing this issue and create a pull request with the fix

Yes

Possible fix

the intervalRef must be nulled out PR on its way

melloware added a commit to melloware/mantine that referenced this issue Aug 12, 2022
@rtivital rtivital added Fixed patch Completed issues that will be published with next patch (1.0.X) and removed review required labels Aug 12, 2022
rtivital pushed a commit that referenced this issue Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants