Function onSnapshot

  • Adds a reaction that will trigger every time an snapshot changes.

    Type Parameters

    • T extends object

      Node type.

    Parameters

    • nodeOrFn: T | () => T

      Node to get the snapshot from or a function to get it.

    • listener: OnSnapshotListener<T>

      Function that will be triggered when the snapshot changes.

    Returns DisposableDispose

    A disposer.