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

setPriority() function

Sets a priority for the data at this Database location.

Applications need not use priority but can order collections by ordinary properties (see Sorting and filtering data ).

Signature:

export declare function setPriority(ref: Reference, priority: string | number | null): Promise<void>;

Parameters

Parameter Type Description
ref Reference The location to write to.
priority string | number | null The priority to be written (string, number, or null).

Returns:

Promise<void>

Resolves when write to server is complete.