From f23e4ec7423c923498fa13a90ddbb27da559a426 Mon Sep 17 00:00:00 2001 From: DylanDylann Date: Sat, 16 Aug 2025 15:35:20 +0700 Subject: [PATCH] remove connect method --- src/libs/actions/Welcome/index.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/libs/actions/Welcome/index.ts b/src/libs/actions/Welcome/index.ts index 096415ba245a..946ba3e0112d 100644 --- a/src/libs/actions/Welcome/index.ts +++ b/src/libs/actions/Welcome/index.ts @@ -150,7 +150,9 @@ function completeHybridAppOnboarding() { }); } -Onyx.connect({ +// We use `connectWithoutView` here since this connection only updates a module-level variable +// and doesn't need to trigger component re-renders. +Onyx.connectWithoutView({ key: ONYXKEYS.NVP_ONBOARDING, callback: (value) => { onboarding = value; @@ -158,7 +160,9 @@ Onyx.connect({ }, }); -Onyx.connect({ +// We use `connectWithoutView` here since this connection only to get loading flag +// and doesn't need to trigger component re-renders. +Onyx.connectWithoutView({ key: ONYXKEYS.IS_LOADING_REPORT_DATA, initWithStoredValues: false, callback: (value) => {