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/database > goOnline

goOnline() function

Reconnects to the server and synchronizes the offline Database state with the server state.

This method should be used after disabling the active connection with goOffline(). Once reconnected, the client will transmit the proper data and fire the appropriate events so that your client "catches up" automatically.

Signature:

export declare function goOnline(db: FirebaseDatabase): void;

Parameters

Parameter Type Description
db FirebaseDatabase The instance to reconnect.

Returns:

void