Function: onSnapshot()
function onSnapshot<T>(nodeOrFn, listener): OnSnapshotDisposer;
Adds a reaction that will trigger every time an snapshot changes.
Type Parameters
| Type Parameter | Description |
|---|---|
T extends object | Object type. |
Parameters
| Parameter | Type | Description |
|---|---|---|
nodeOrFn | T | (() => T) | Object to get the snapshot from or a function to get it. |
listener | OnSnapshotListener<T> | Function that will be triggered when the snapshot changes. |
Returns
A disposer.