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
mountiny committed Jul 3, 2024
1 parent 55546bb commit 135c6be
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 116 deletions.

This file was deleted.

25 changes: 1 addition & 24 deletions patches/react-native-reanimated+3.8.1+003+fix-strict-mode.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {

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 135c6be

Please sign in to comment.