Skip to content

Commit 38b1e0e

Browse files
authored
Merge pull request Expensify#67744 from callstack-internal/bugfix/remove-connect-CachedPDFPaths
[NO QA] Bugfix/remove connect cached pdf paths
2 parents 97f174a + 293ae17 commit 38b1e0e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/libs/actions/CachedPDFPaths/index.native.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ import type {Add, Clear, ClearByKey} from './types';
88
* This is to remove the cached PDFs when an attachment is deleted or the user logs out.
99
*/
1010
let pdfPaths: Record<string, string> = {};
11-
Onyx.connect({
11+
// We use `connectWithoutView` here since this connection only updates a module-level variable
12+
// and doesn't need to trigger component re-renders
13+
Onyx.connectWithoutView({
1214
key: ONYXKEYS.CACHED_PDF_PATHS,
1315
callback: (val) => {
1416
pdfPaths = val ?? {};

0 commit comments

Comments
 (0)