( snapshot: DocumentSnapshot<T> | undefined, options?: SnapshotOptions, initialValue?: T )
| 156 | }; |
| 157 | |
| 158 | const getValueFromSnapshot = <T>( |
| 159 | snapshot: DocumentSnapshot<T> | undefined, |
| 160 | options?: SnapshotOptions, |
| 161 | initialValue?: T |
| 162 | ): T | undefined => { |
| 163 | return useMemo( |
| 164 | () => (snapshot?.data(options) ?? initialValue) as T | undefined, |
| 165 | [snapshot, options, initialValue] |
| 166 | ); |
| 167 | }; |
no outgoing calls
no test coverage detected