Skip to content

How to execute timers cleanup before HMR will refresh the page #11836

@oleksii-boiko

Description

@oleksii-boiko

I have a react application this with some setTimeOut's inside. And after each save HMR react and refreshes the application, but timeouts still going and executing their code.

So question is, do we have some hook (like beforeRefresh), so that I can cleanup timers in it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions