@urth/metatell-sdk - v0.1.0
    Preparing search index...

    Function onProfileUpdate

    • Subscribe to changes to the current user's profile.

      The handler is invoked whenever the display name or avatar changes.

      Parameters

      • fn: (profile: UserProfile) => void

        Handler that receives the updated profile.

      Returns Unsubscribe

      A function that cancels the subscription. Always call it during plugin teardown to avoid leaks.

      import { onProfileUpdate } from "@urth/metatell-sdk/user";

      const unsubscribe = onProfileUpdate((profile) => {
      nameLabel.textContent = profile.displayName;
      });

      // later, on teardown
      unsubscribe();