diff --git a/package.json b/package.json index 6def92653e6e..6007ef6bb7fa 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "test:debug": "TZ=utc NODE_OPTIONS='--inspect-brk --experimental-vm-modules' jest --runInBand", "perf-test": "NODE_OPTIONS=--experimental-vm-modules npx reassure", "typecheck": "NODE_OPTIONS=--max_old_space_size=8192 tsc", - "lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=216 --cache --cache-location=node_modules/.cache/eslint", + "lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=215 --cache --cache-location=node_modules/.cache/eslint", "lint-changed": "NODE_OPTIONS=--max_old_space_size=8192 ./scripts/lintChanged.sh", "lint-watch": "npx eslint-watch --watch --changed", "shellcheck": "./scripts/shellCheck.sh", diff --git a/src/libs/actions/App.ts b/src/libs/actions/App.ts index a8fc974c3e79..739a77f5218a 100644 --- a/src/libs/actions/App.ts +++ b/src/libs/actions/App.ts @@ -66,13 +66,18 @@ Onyx.connect({ }, }); +// hasLoadedAppPromise is used in the "reconnectApp" function and is not directly associated with the View, +// so retrieving it using Onyx.connectWithoutView is correct. let resolveHasLoadedAppPromise: () => void; const hasLoadedAppPromise = new Promise((resolve) => { resolveHasLoadedAppPromise = resolve; }); +// hasLoadedApp is used in the "reconnectApp" function and is not directly associated with the View, +// so retrieving it using Onyx.connectWithoutView is correct. +// If this variable is ever needed for use in React components, it should be retrieved using useOnyx. let hasLoadedApp: boolean | undefined; -Onyx.connect({ +Onyx.connectWithoutView({ key: ONYXKEYS.HAS_LOADED_APP, callback: (value) => { hasLoadedApp = value;