Skip to content
This repository was archived by the owner on Apr 19, 2026. It is now read-only.

How to start and stop web worker on different routes #39

Description

@yantsishko

I use comlink-loader in singleton mode.

Web workers inits on app start and not depend on which route open now.
How i can start web worker on certain route and stop it when i go to another one?

I know that i can use close method in worker for stop

export const terminate = () => { close(); };

But after call close() method i can't start worker again without refresh page.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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