diff --git a/patches/@react-navigation+core+6.4.11+001+fix-react-strictmode.patch b/patches/@react-navigation+core+6.4.11+001+fix-react-strictmode.patch
deleted file mode 100644
index 8941bb380a797..0000000000000
--- a/patches/@react-navigation+core+6.4.11+001+fix-react-strictmode.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-diff --git a/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js b/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js
-index 051520b..6fb49e0 100644
---- a/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js
-+++ b/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js
-@@ -174,10 +174,6 @@ export default function useNavigationBuilder(createRouter, options) {
- getIsInitial
- } = React.useContext(NavigationStateContext);
- const stateCleanedUp = React.useRef(false);
-- const cleanUpState = React.useCallback(() => {
-- setCurrentState(undefined);
-- stateCleanedUp.current = true;
-- }, [setCurrentState]);
- const setState = React.useCallback(state => {
- if (stateCleanedUp.current) {
- // State might have been already cleaned up due to unmount
-@@ -291,6 +287,9 @@ export default function useNavigationBuilder(createRouter, options) {
- // So we override the state object we return to use the latest state as soon as possible
- state = nextState;
- React.useEffect(() => {
-+ // In strict mode, React will double-invoke effects.
-+ // So we need to reset the flag if component was not unmounted
-+ stateCleanedUp.current = false;
- setKey(navigatorKey);
- if (!getIsInitial()) {
- // If it's not initial render, we need to update the state
-@@ -300,14 +299,10 @@ export default function useNavigationBuilder(createRouter, options) {
- }
- return () => {
- // We need to clean up state for this navigator on unmount
-- // We do it in a timeout because we need to detect if another navigator mounted in the meantime
-- // For example, if another navigator has started rendering, we should skip cleanup
-- // Otherwise, our cleanup step will cleanup state for the other navigator and re-initialize it
-- setTimeout(() => {
-- if (getCurrentState() !== undefined && getKey() === navigatorKey) {
-- cleanUpState();
-- }
-- }, 0);
-+ if (getCurrentState() !== undefined && getKey() === navigatorKey) {
-+ setCurrentState(undefined);
-+ stateCleanedUp.current = true;
-+ }
- };
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, []);
diff --git a/patches/react-native-reanimated+3.8.1+003+fix-strict-mode.patch b/patches/react-native-reanimated+3.8.1+003+fix-strict-mode.patch
index ccc208062d104..bd9c5da55f0e6 100644
--- a/patches/react-native-reanimated+3.8.1+003+fix-strict-mode.patch
+++ b/patches/react-native-reanimated+3.8.1+003+fix-strict-mode.patch
@@ -10,27 +10,4 @@ index 3404e89..b545cb6 100644
+ // react_native_assert(reanimatedCommitFlag_ != true);
reanimatedCommitFlag_ = true;
}
-
-diff --git a/node_modules/react-native-reanimated/lib/module/reanimated2/UpdateProps.js b/node_modules/react-native-reanimated/lib/module/reanimated2/UpdateProps.js
-index e69c581..78b7034 100644
---- a/node_modules/react-native-reanimated/lib/module/reanimated2/UpdateProps.js
-+++ b/node_modules/react-native-reanimated/lib/module/reanimated2/UpdateProps.js
-@@ -7,14 +7,11 @@ import { isFabric, isJest, shouldBeUseWeb } from './PlatformChecker';
- import { runOnUIImmediately } from './threads';
- let updateProps;
- if (shouldBeUseWeb()) {
-- updateProps = (_, updates, maybeViewRef, isAnimatedProps) => {
-+ updateProps = (viewDescriptorsSet, updates, maybeViewRef, isAnimatedProps) => {
- 'worklet';
--
-- if (maybeViewRef) {
-- maybeViewRef.items.forEach((item, _index) => {
-- _updatePropsJS(updates, item, isAnimatedProps);
-- });
-- }
-+ viewDescriptorsSet.value.forEach((viewDescriptor) => {
-+ _updatePropsJS(updates, {_component: viewDescriptor.tag}, isAnimatedProps);
-+ })
- };
- } else {
- updateProps = (viewDescriptors, updates) => {
+
diff --git a/src/App.tsx b/src/App.tsx
index 21025d34a6611..1ce17ea095bd1 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -31,7 +31,6 @@ import {CurrentReportIDContextProvider} from './components/withCurrentReportID';
import {EnvironmentProvider} from './components/withEnvironment';
import {KeyboardStateProvider} from './components/withKeyboardState';
import {WindowDimensionsProvider} from './components/withWindowDimensions';
-import CONFIG from './CONFIG';
import Expensify from './Expensify';
import useDefaultDragAndDrop from './hooks/useDefaultDragAndDrop';
import {ReportIDsContextProvider} from './hooks/useReportIDs';
@@ -53,56 +52,51 @@ LogBox.ignoreLogs([
const fill = {flex: 1};
-const StrictModeWrapper = CONFIG.USE_REACT_STRICT_MODE ? React.StrictMode : ({children}: {children: React.ReactElement}) => children;
-
function App({url}: AppProps) {
useDefaultDragAndDrop();
OnyxUpdateManager();
-
return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
);
}
diff --git a/src/CONFIG.ts b/src/CONFIG.ts
index 8800cc907588a..9ed4242d7604e 100644
--- a/src/CONFIG.ts
+++ b/src/CONFIG.ts
@@ -96,5 +96,4 @@ export default {
IOS_CLIENT_ID: '921154746561-s3uqn2oe4m85tufi6mqflbfbuajrm2i3.apps.googleusercontent.com',
},
GCP_GEOLOCATION_API_KEY: googleGeolocationAPIKey,
- USE_REACT_STRICT_MODE: true,
} as const;
diff --git a/src/setup/platformSetup/index.website.ts b/src/setup/platformSetup/index.website.ts
index 07917e0e6f650..77c3739575108 100644
--- a/src/setup/platformSetup/index.website.ts
+++ b/src/setup/platformSetup/index.website.ts
@@ -53,6 +53,7 @@ const webUpdater = (): PlatformSpecificUpdater => ({
export default function () {
AppRegistry.runApplication(Config.APP_NAME, {
rootTag: document.getElementById('root'),
+ mode: 'legacy',
});
// When app loads, get current version (production only)