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 > get

get() function

Gets the most up-to-date result for this query.

Signature:

export declare function get(query: Query): Promise<DataSnapshot>;

Parameters

Parameter Type Description
query Query The query to run.

Returns:

Promise<DataSnapshot>

A promise which resolves to the resulting DataSnapshot if a value is available, or rejects if the client is unable to return a value (e.g., if the server is unreachable and there is nothing cached).