Skip to content

Commit

Permalink
Final cleanups for concurrent mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Kicu committed Jun 20, 2024
1 parent 85250a6 commit a2c8d2c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ 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';
Expand All @@ -52,15 +53,14 @@ LogBox.ignoreLogs([

const fill = {flex: 1};

const USE_STRICT_MODE = true;
const Wrapper = USE_STRICT_MODE ? React.StrictMode : ({children}: {children: React.ReactElement}) => children;
const StrictModeWrapper = CONFIG.USE_REACT_STRICT_MODE ? React.StrictMode : ({children}: {children: React.ReactElement}) => children;

function App({url}: AppProps) {
useDefaultDragAndDrop();
OnyxUpdateManager();

return (
<Wrapper>
<StrictModeWrapper>
<InitialURLContextProvider url={url}>
<GestureHandlerRootView style={fill}>
<ComposeProviders
Expand Down Expand Up @@ -102,7 +102,7 @@ function App({url}: AppProps) {
</ComposeProviders>
</GestureHandlerRootView>
</InitialURLContextProvider>
</Wrapper>
</StrictModeWrapper>
);
}

Expand Down
1 change: 1 addition & 0 deletions src/CONFIG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,5 @@ export default {
IOS_CLIENT_ID: '921154746561-s3uqn2oe4m85tufi6mqflbfbuajrm2i3.apps.googleusercontent.com',
},
GCP_GEOLOCATION_API_KEY: googleGeolocationAPIKey,
USE_REACT_STRICT_MODE: true,
} as const;
1 change: 0 additions & 1 deletion src/setup/platformSetup/index.website.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ 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)
Expand Down

0 comments on commit a2c8d2c

Please sign in to comment.