Skip to content

Commit

Permalink
cleanup part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
kacper-mikolajczak committed Sep 30, 2024
1 parent 397b4dd commit a41bd1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/useOnyx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function useOnyx<TKey extends OnyxKey, TReturnValue = OnyxValue<TKey>>(key: TKey

// Stores the previous cached value as it's necessary to compare with the new value in `getSnapshot()`.
// We initialize it to `null` to simulate that we don't have any value from cache yet.
const previousValueRef = useRef<TReturnValue | OnyxValue<TKey> | undefined | null>(null);
const previousValueRef = useRef<CachedValue<TKey, TReturnValue> | undefined | null>(null);

// Stores the newest cached value in order to compare with the previous one and optimize `getSnapshot()` execution.
const newValueRef = useRef<CachedValue<TKey, TReturnValue> | undefined | null>(null);
Expand Down

0 comments on commit a41bd1b

Please sign in to comment.