Skip to content

Commit

Permalink
remove polyfill for lifecycles
Browse files Browse the repository at this point in the history
  • Loading branch information
John Tran committed Jul 4, 2018
1 parent 7f16b7b commit fcdf6e7
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion packages/react-relay/classic/container/RelayContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ function createContainerComponent(
);
}

componentWillMount(): void {
UNSAFE_componentWillMount(): void {
if (this.context.route.useMockData) {
return;
}
Expand Down
4 changes: 0 additions & 4 deletions packages/react-relay/modern/ReactRelayFragmentContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const RelayPropTypes = require('../classic/container/RelayPropTypes');
const areEqual = require('areEqual');
const buildReactRelayContainer = require('./buildReactRelayContainer');
const isScalarAndEqual = require('isScalarAndEqual');
const polyfill = require('react-lifecycles-compat');
const warning = require('warning');

const {
Expand Down Expand Up @@ -307,9 +306,6 @@ function createContainerWithFragments<
}
profileContainer(Container, 'ReactRelayFragmentContainer');

// Make static getDerivedStateFromProps work with older React versions:
polyfill(Container);

return Container;
}

Expand Down
2 changes: 0 additions & 2 deletions packages/react-relay/modern/ReactRelayQueryRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const RelayPropTypes = require('../classic/container/RelayPropTypes');

const areEqual = require('areEqual');
const deepFreeze = require('deepFreeze');
const polyfill = require('react-lifecycles-compat');

import type {RelayEnvironmentInterface as ClassicEnvironment} from '../classic/store/RelayEnvironment';
import type {
Expand Down Expand Up @@ -310,6 +309,5 @@ function fetchQueryAndComputeStateFromProps(
}

// Make static getDerivedStateFromProps work with older React versions:
polyfill(ReactRelayQueryRenderer);

module.exports = ReactRelayQueryRenderer;
2 changes: 0 additions & 2 deletions packages/react-relay/modern/ReactRelayRefetchContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const RelayPropTypes = require('../classic/container/RelayPropTypes');
const areEqual = require('areEqual');
const buildReactRelayContainer = require('./buildReactRelayContainer');
const isScalarAndEqual = require('isScalarAndEqual');
const polyfill = require('react-lifecycles-compat');

const {
getComponentName,
Expand Down Expand Up @@ -430,7 +429,6 @@ function createContainerWithFragments<
profileContainer(Container, 'ReactRelayRefetchContainer');

// Make static getDerivedStateFromProps work with older React versions:
polyfill(Container);

return Container;
}
Expand Down

0 comments on commit fcdf6e7

Please sign in to comment.