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

🐞 React 17 - Timer starting without timer.start() although startManually prop is true #386

Open
1 task done
rpc5255 opened this issue Jan 31, 2024 · 0 comments
Open
1 task done
Assignees
Labels
bug A verified and reproducible bug. triage Has not been reviewed yet and should not be worked on.

Comments

@rpc5255
Copy link

rpc5255 commented Jan 31, 2024

What happened?

https://codesandbox.io/p/sandbox/gallant-worker-wwwyv2

The timer is starting when you move your mouse into the browser even though timer.start() was not called and startManually prop is true. timer.reset() was called in the mount. To fix, I can update my index.js to the React v18 default way. This is just sample code. In my current project, I cannot update to React v18.

Reproduction Steps

1. Use React v17
2. call timer.reset() in componentDidMount
3. move mouse inside browser
4. the timer will start running
...

Relevant log output

No response

Screenshots or Additional Context

No response

Module Version

5.7.2

What browsers are you seeing the problem on? Select all that apply.

No response

What devices are you seeing the problem on?

No response

Verification

  • I have checked for existing closed issues and discussions.
@rpc5255 rpc5255 added bug A verified and reproducible bug. triage Has not been reviewed yet and should not be worked on. labels Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A verified and reproducible bug. triage Has not been reviewed yet and should not be worked on.
Projects
None yet
Development

No branches or pull requests

2 participants