Skip to content

Adding a "do not re-track" watcher option #197

Open
@brandon942

Description

Here's the issue I have with watchers.

  • dependency tracking and dependency list re-creation on every single triggering of the watch function even in watchers with an unchanging set of reactive properties (eg. functions with 1 branch path or watchers of 1 reactive property). Watchers need a "fixed" or "do not re-track" option because in half of all cases they do unnecessary work
  • watchers are hidden. The watch() function might as well return the watcher instead of a wrapper function around watcher.teardown(). In one use case I am changing a list of properties accessed in the watcher function and then I re run the watcher to re-track watcher.run(). Such use cases are rare but they do exist.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions