Skip to content

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

Open
@rpc5255

Description

@rpc5255

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.

Metadata

Metadata

Labels

bugA verified and reproducible bug.triageHas not been reviewed yet and should not be worked on.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions