Skip to content
This repository has been archived by the owner on Feb 25, 2020. It is now read-only.

Commit

Permalink
Remove react-lifecycles-compat to reduce bundle size impact.
Browse files Browse the repository at this point in the history
- Also bump React, React Native, and babel devDependencies
  • Loading branch information
matthargett authored and brentvatne committed Mar 8, 2019
1 parent f095bca commit bac46d6
Show file tree
Hide file tree
Showing 11 changed files with 2,643 additions and 1,608 deletions.
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

7 changes: 7 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// eslint-disable-next-line import/no-commonjs
module.exports = function(api) {
api.cache(true);
return {
presets: ['module:metro-react-native-babel-preset'],
};
};
7 changes: 3 additions & 4 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@
"react-navigation-tabs": "^1.0.2"
},
"resolutions": {
"**/react": "16.3.1",
"**/prop-types": "15.6.0",
"**/react-lifecycles-compat": "3.0.4",
"**/hoist-non-react-statics": "2.5.0"
"**/react": "16.6.3",
"**/prop-types": "15.6.2",
"**/hoist-non-react-statics": "2.5.5"
},
"devDependencies": {
"babel-preset-expo": "^5.0.0"
Expand Down
551 changes: 275 additions & 276 deletions example/yarn.lock

Large diffs are not rendered by default.

46 changes: 24 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"test": "jest",
"lint": "eslint .",
"format": "eslint . --fix",
"babel": "babel --no-babelrc --plugins=transform-es2015-block-scoping,transform-es2015-modules-commonjs,transform-react-jsx,transform-class-properties,transform-object-rest-spread,transform-flow-strip-types src --copy-files --out-dir dist --ignore '**/__tests__/**','*.ts'",
"babel": "babel --no-babelrc --plugins=@babel/transform-block-scoping,@babel/transform-modules-commonjs,@babel/transform-react-jsx,@babel/proposal-class-properties,@babel/proposal-object-rest-spread,@babel/transform-flow-strip-types src --copy-files --out-dir dist --ignore '**/__tests__/**','*.ts'",
"tsc": "tsc",
"build": "yarn babel --out-dir dist && yarn tsc",
"dev": "yarn babel --watch src --out-dir example/node_modules/@react-navigation/core/dist",
Expand Down Expand Up @@ -43,37 +43,39 @@
"homepage": "https://github.com/react-navigation/react-navigation-core#readme",
"dependencies": {
"create-react-context": "0.2.2",
"hoist-non-react-statics": "^3.0.1",
"hoist-non-react-statics": "^2.5.5",
"path-to-regexp": "^1.7.0",
"query-string": "^6.2.0",
"react-is": "^16.5.2",
"react-lifecycles-compat": "^3.0.4"
"react-is": "^16.6.3"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-jest": "^22.4.1",
"babel-plugin-transform-class-properties": "^6.13.0",
"babel-plugin-transform-es2015-block-scoping": "^6.26.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
"babel-plugin-transform-flow-strip-types": "^6.22.0",
"babel-plugin-transform-object-rest-spread": "^6.13.0",
"babel-plugin-transform-react-jsx": "^6.18.0",
"babel-preset-react-native": "^4.0.0",
"@babel/cli": "^7.2.3",
"@babel/core": "^7.3.4",
"@babel/plugin-proposal-class-properties": "7.3.4",
"@babel/plugin-proposal-object-rest-spread": "7.3.4",
"@babel/plugin-transform-block-scoping": "7.3.4",
"@babel/plugin-transform-modules-commonjs": "7.2.0",
"@babel/plugin-transform-flow-strip-types": "7.3.4",
"@babel/plugin-transform-react-jsx": "7.3.0",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^24.1.0",
"metro-react-native-babel-preset": "^0.49.2",
"conventional-changelog-cli": "^2.0.5",
"eslint": "^4.12.1",
"eslint-config-satya164": "^1.0.1",
"eslint-plugin-react-native-globals": "^0.1.0",
"husky": "^1.1.2",
"jest": "^22.1.3",
"jest-expo": "^30.0.0",
"prettier": "^1.8.2",
"react": "16.3.1",
"react-dom": "16.3.1",
"react-native": "^0.55.4",
"react-test-renderer": "16.3.1",
"jest": "^24.1.0",
"jest-expo": "^32.0.0",
"prettier": "^1.13.6",
"react": "16.6.3",
"react-dom": "16.6.3",
"react-native": "^0.58.6",
"react-test-renderer": "16.6.3",
"release-it": "^7.6.1",
"ts-jest": "^23.10.4",
"typescript": "^3.1.3"
"ts-jest": "^24.0.0",
"typescript": "^3.3.3333"
},
"peerDependencies": {
"react": "*"
Expand Down
6 changes: 0 additions & 6 deletions src/__tests__/.eslintrc

This file was deleted.

6 changes: 0 additions & 6 deletions src/navigators/__tests__/.eslintrc

This file was deleted.

3 changes: 1 addition & 2 deletions src/navigators/createNavigator.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import { polyfill } from 'react-lifecycles-compat';
import invariant from '../utils/invariant';

function createNavigator(NavigatorView, router, navigationConfig) {
Expand Down Expand Up @@ -70,7 +69,7 @@ function createNavigator(NavigatorView, router, navigationConfig) {
}
}

return polyfill(Navigator);
return Navigator;
}

export default createNavigator;
6 changes: 0 additions & 6 deletions src/routers/__tests__/.eslintrc

This file was deleted.

6 changes: 0 additions & 6 deletions src/views/__tests__/.eslintrc

This file was deleted.

Loading

0 comments on commit bac46d6

Please sign in to comment.