Handler that receives the updated profile.
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();
Subscribe to changes to the current user's profile.
The handler is invoked whenever the display name or avatar changes.