Skip to content

Commit

Permalink
Delete ReactNativeStack πŸŽ‰ πŸŽ‰ πŸŽ‰ (#10511)
Browse files Browse the repository at this point in the history
* Removed createReactNativeComponentClassStack and renamed createReactNativeComponentClassFiber => createReactNativeComponentClass

* Removed findNumericNodeHandleStack and renamed findNumericNodeHandleFiber => findNumericNodeHandle

* Renamed ReactNativeFiberEntry => ReactNativeEntry

* Removed all references to ReactNativeFeatureFlags and RN stack

* Removed severl RN modules that are no longer used

* Renamed ReactNativeEntry => ReactNativeFiberEntry for now. We'll probably remove 'fiber' references later

* Update build results json

* Deleted snapshot

* Re-add accidentally deleted test

* Remove now-unnecessary hack in test

* Fix lint

* RN findNodeHandle no longer adds props directly to read-only owner (#10520)

* Added ReactNativeMount-test snapshot for 'renders and reorders children' test
  • Loading branch information
bvaughn authored Aug 23, 2017
1 parent 34780da commit 2fa38ac
Show file tree
Hide file tree
Showing 33 changed files with 145 additions and 3,583 deletions.
6 changes: 0 additions & 6 deletions scripts/jest/fiber.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ jest.mock('ReactFeatureFlags', () => {
disableNewFiberFeatures: true,
});
});
jest.mock('ReactNativeFeatureFlags', () => {
const flags = require.requireActual('ReactNativeFeatureFlags');
return Object.assign({}, flags, {
useFiber: true,
});
});

// Error logging varies between Fiber and Stack;
// Rather than fork dozens of tests, mock the error-logging file by default.
Expand Down
6 changes: 0 additions & 6 deletions scripts/jest/stack.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ jest.mock('ReactDOMFeatureFlags', () => {
useFiber: false,
});
});
jest.mock('ReactNativeFeatureFlags', () => {
const flags = require.requireActual('ReactNativeFeatureFlags');
return Object.assign({}, flags, {
useFiber: false,
});
});

// Error logging varies between Fiber and Stack;
// Rather than fork dozens of tests, mock the error-logging file by default.
Expand Down
48 changes: 0 additions & 48 deletions scripts/rollup/bundles.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,48 +251,6 @@ const bundles = [
},

/******* React Native *******/
{
babelOpts: babelOptsReact,
bundleTypes: [RN_DEV, RN_PROD],
config: {
destDir: 'build/',
moduleName: 'ReactNativeStack',
sourceMap: false,
},
entry: 'src/renderers/native/ReactNativeStackEntry',
externals: [
'ExceptionsManager',
'InitializeCore',
'ReactNativeFeatureFlags',
'RCTEventEmitter',
'TextInputState',
'UIManager',
'View',
'deepDiffer',
'deepFreezeAndThrowOnMutationInDev',
'flattenStyle',
'prop-types/checkPropTypes',
],
hasteName: 'ReactNativeStack',
isRenderer: true,
label: 'native-stack',
manglePropertiesOnProd: false,
name: 'react-native-renderer',
paths: [
'src/renderers/native/**/*.js',
'src/renderers/shared/**/*.js',

'src/ReactVersion.js',
'src/shared/**/*.js',
],
useFiber: false,
modulesToStub: [
'createReactNativeComponentClassFiber',
'ReactNativeFiberRenderer',
'findNumericNodeHandleFiber',
'ReactNativeFiber',
],
},
{
babelOpts: babelOptsReact,
bundleTypes: [RN_DEV, RN_PROD],
Expand All @@ -305,7 +263,6 @@ const bundles = [
externals: [
'ExceptionsManager',
'InitializeCore',
'ReactNativeFeatureFlags',
'RCTEventEmitter',
'TextInputState',
'UIManager',
Expand All @@ -328,11 +285,6 @@ const bundles = [
'src/shared/**/*.js',
],
useFiber: true,
modulesToStub: [
'createReactNativeComponentClassStack',
'findNumericNodeHandleStack',
'ReactNativeStack',
],
},

/******* React Test Renderer *******/
Expand Down
2 changes: 0 additions & 2 deletions scripts/rollup/modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@ function ignoreReactNativeModules() {
return [
// This imports NativeMethodsMixin, causing a circular dependency.
'View',
// This file is injected based on a runtime config.
'ReactNativeFeatureFlags',
];
}

Expand Down
28 changes: 10 additions & 18 deletions scripts/rollup/results.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,24 +57,24 @@
"gzip": 13357
},
"react-dom-unstable-native-dependencies.development.js (UMD_DEV)": {
"size": 88285,
"gzip": 22345
"size": 87907,
"gzip": 22195
},
"react-dom-unstable-native-dependencies.production.min.js (UMD_PROD)": {
"size": 15149,
"gzip": 4910
},
"react-dom-unstable-native-dependencies.development.js (NODE_DEV)": {
"size": 81733,
"gzip": 20383
"size": 81355,
"gzip": 20240
},
"react-dom-unstable-native-dependencies.production.min.js (NODE_PROD)": {
"size": 13926,
"gzip": 4403
},
"ReactDOMUnstableNativeDependencies-dev.js (FB_DEV)": {
"size": 81432,
"gzip": 20341
"size": 81054,
"gzip": 20200
},
"ReactDOMUnstableNativeDependencies-prod.js (FB_PROD)": {
"size": 66066,
Expand Down Expand Up @@ -136,21 +136,13 @@
"size": 220269,
"gzip": 45845
},
"ReactNativeStack-dev.js (RN_DEV)": {
"size": 201077,
"gzip": 37401
},
"ReactNativeStack-prod.js (RN_PROD)": {
"size": 136715,
"gzip": 26222
},
"ReactNativeFiber-dev.js (RN_DEV)": {
"size": 306002,
"gzip": 52993
"size": 303055,
"gzip": 52683
},
"ReactNativeFiber-prod.js (RN_PROD)": {
"size": 221418,
"gzip": 38321
"size": 218403,
"gzip": 37966
},
"react-test-renderer.development.js (NODE_DEV)": {
"size": 299567,
Expand Down
10 changes: 2 additions & 8 deletions scripts/rollup/shims/react-native/ReactNative.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,14 @@
*/
'use strict';

const ReactNativeFeatureFlags = require('ReactNativeFeatureFlags');

import type {ReactNativeType} from 'ReactNativeTypes';

let ReactNative;

if (__DEV__) {
ReactNative = ReactNativeFeatureFlags.useFiber
? require('ReactNativeFiber-dev')
: require('ReactNativeStack-dev');
ReactNative = require('ReactNativeFiber-dev');
} else {
ReactNative = ReactNativeFeatureFlags.useFiber
? require('ReactNativeFiber-prod')
: require('ReactNativeStack-prod');
ReactNative = require('ReactNativeFiber-prod');
}

module.exports = (ReactNative: ReactNativeType);
7 changes: 1 addition & 6 deletions src/node_modules/react-native/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2fa38ac

Please sign in to comment.