Skip to content

Commit

Permalink
Revert "Merge pull request #42592 from software-mansion-labs/kicu/con…
Browse files Browse the repository at this point in the history
…current-react-lets-go"

This reverts commit d047467, reversing
changes made to 04f6598.
  • Loading branch information
bondydaa committed Jul 3, 2024
1 parent a9b4fef commit a3dd23a
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 128 deletions.

This file was deleted.

36 changes: 0 additions & 36 deletions patches/react-native-reanimated+3.8.1+003+fix-strict-mode.patch

This file was deleted.

88 changes: 41 additions & 47 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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 (
<StrictModeWrapper>
<InitialURLContextProvider url={url}>
<GestureHandlerRootView style={fill}>
<ComposeProviders
components={[
OnyxProvider,
ThemeProvider,
ThemeStylesProvider,
ThemeIllustrationsProvider,
SafeAreaProvider,
PortalProvider,
SafeArea,
LocaleContextProvider,
HTMLEngineProvider,
WindowDimensionsProvider,
KeyboardStateProvider,
PopoverContextProvider,
CurrentReportIDContextProvider,
ScrollOffsetContextProvider,
ReportAttachmentsProvider,
PickerStateProvider,
EnvironmentProvider,
CustomStatusBarAndBackgroundContextProvider,
ActiveElementRoleProvider,
ActiveWorkspaceContextProvider,
ReportIDsContextProvider,
PlaybackContextProvider,
FullScreenContextProvider,
VolumeContextProvider,
VideoPopoverMenuContextProvider,
KeyboardProvider,
]}
>
<CustomStatusBarAndBackground />
<ErrorBoundary errorMessage="NewExpensify crash caught by error boundary">
<ColorSchemeWrapper>
<Expensify />
</ColorSchemeWrapper>
</ErrorBoundary>
</ComposeProviders>
</GestureHandlerRootView>
</InitialURLContextProvider>
</StrictModeWrapper>
<InitialURLContextProvider url={url}>
<GestureHandlerRootView style={fill}>
<ComposeProviders
components={[
OnyxProvider,
ThemeProvider,
ThemeStylesProvider,
ThemeIllustrationsProvider,
SafeAreaProvider,
PortalProvider,
SafeArea,
LocaleContextProvider,
HTMLEngineProvider,
WindowDimensionsProvider,
KeyboardStateProvider,
PopoverContextProvider,
CurrentReportIDContextProvider,
ScrollOffsetContextProvider,
ReportAttachmentsProvider,
PickerStateProvider,
EnvironmentProvider,
CustomStatusBarAndBackgroundContextProvider,
ActiveElementRoleProvider,
ActiveWorkspaceContextProvider,
ReportIDsContextProvider,
PlaybackContextProvider,
FullScreenContextProvider,
VolumeContextProvider,
VideoPopoverMenuContextProvider,
KeyboardProvider,
]}
>
<CustomStatusBarAndBackground />
<ErrorBoundary errorMessage="NewExpensify crash caught by error boundary">
<ColorSchemeWrapper>
<Expensify />
</ColorSchemeWrapper>
</ErrorBoundary>
</ComposeProviders>
</GestureHandlerRootView>
</InitialURLContextProvider>
);
}

Expand Down
1 change: 0 additions & 1 deletion src/CONFIG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
1 change: 1 addition & 0 deletions src/setup/platformSetup/index.website.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a3dd23a

Please sign in to comment.