Subscribe to changes to the current user's profile.
The handler is invoked whenever the display name or avatar changes.
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 teardownunsubscribe(); Copy
import { onProfileUpdate } from "@urth/metatell-sdk/user";const unsubscribe = onProfileUpdate((profile) => { nameLabel.textContent = profile.displayName;});// later, on teardownunsubscribe();
Subscribe to changes to the current user's profile.
The handler is invoked whenever the display name or avatar changes.