React Native Firebase
    Preparing search index...

    The ServerValue interface provides access to Firebase server values.

    interface ServerValue {
        TIMESTAMP: object;
        increment(delta: number): object;
    }
    Index

    Methods

    Properties

    Methods

    • Returns a placeholder value that can be used to atomically increment the current database value by the provided delta.

      firebase.database().ref('posts/123').update({
      likes: firebase.database.ServerValue.increment(1),
      });

      Parameters

      • delta: number

        The amount to modify the current value atomically.

      Returns object

    Properties

    TIMESTAMP: object

    A placeholder value for auto-populating the current timestamp (time since the Unix epoch, in milliseconds) as determined by the Firebase servers.

    firebase.database().ref('sessions').push({
    startedAt: firebase.database.ServerValue.TIMESTAMP,
    });