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..8e56c81110b8 100644 --- a/src/libs/actions/App.ts +++ b/src/libs/actions/App.ts @@ -50,8 +50,10 @@ Onyx.connect({ initWithStoredValues: false, }); +// `isUsingImportedState` is only used in `clearOnyxAndResetApp`, not during render. So `Onyx.connectWithoutView` is appropriate. +// If React components need this value in the future, use `useOnyx` instead. let isUsingImportedState: boolean | undefined; -Onyx.connect({ +Onyx.connectWithoutView({ key: ONYXKEYS.IS_USING_IMPORTED_STATE, callback: (value) => { isUsingImportedState = value ?? false;