Skip to content

multiple onExpire calls when the function is asynchronous #72

Open
@HreneanAlin

Description

@HreneanAlin

Hi,
It may be something that I do wrong, but if I assign onExpire prop to an async function that handles an API request and receives a response containing a new timestamp that will be passed to the restart function, when the timer expires, the function in called multiple times.
here is a sandbox example https://codesandbox.io/s/cool-wildflower-9v3ft?file=/src/App.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions