The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Home > @firebase/installations > onIdChange

onIdChange() function

Sets a new callback that will get called when Installation ID changes. Returns an unsubscribe function that will remove the callback when called.

Signature:

export declare function onIdChange(installations: FirebaseInstallations, callback: IdChangeCallbackFn): IdChangeUnsubscribeFn;

Parameters

Parameter Type Description
installations FirebaseInstallations The Installations instance.
callback IdChangeCallbackFn The callback function that is invoked when FID changes.

Returns:

IdChangeUnsubscribeFn

A function that can be called to unsubscribe.