campfire.js
    Preparing search index...

    Function untrack

    • Stop tracking an element that was previously tracked by track(). If you're calling track for thousands of elements it's probably a good idea to untrack them when you're done.

      Parameters

      • id: string

        Id of the element to untrack, as passed to track().

      Returns void

      // Clean up when a component is removed
      function removeComponent(id: string) {
      const element = tracked(id);
      if (element) {
      element.remove();
      untrack(id);
      }
      }