Skip to content

Commit

Permalink
Merge pull request #975 from gaearon/react-lifecycles-compact
Browse files Browse the repository at this point in the history
react-lifecycles-compat fixes, related to #951
  • Loading branch information
theKashey authored May 14, 2018
2 parents d81aa67 + 23f3660 commit a352cbb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"global": "^4.3.0",
"hoist-non-react-statics": "^2.5.0",
"prop-types": "^15.6.1",
"react-lifecycles-compat": "^3.0.2",
"react-lifecycles-compat": "^3.0.4",
"shallowequal": "^1.0.2"
},
"engines": {
Expand Down
6 changes: 4 additions & 2 deletions src/AppContainer.dev.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import { polyfill } from 'react-lifecycles-compat'
import defaultPolyfill, { polyfill } from 'react-lifecycles-compat'
import logger from './logger'
import { get as getGeneration } from './global/generation'

Expand Down Expand Up @@ -63,6 +63,8 @@ AppContainer.propTypes = {
errorReporter: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
}

polyfill(AppContainer)
// trying first react-lifecycles-compat.polyfill, then trying react-lifecycles-compat, which could be .default
const realPolyfill = polyfill || defaultPolyfill
realPolyfill(AppContainer)

export default AppContainer
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4769,6 +4769,10 @@ react-lifecycles-compat@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.2.tgz#7279047275bd727a912e25f734c0559527e84eff"

react-lifecycles-compat@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362"

react-mount@^0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/react-mount/-/react-mount-0.1.3.tgz#2ea9cf95f1b4c49c6a4cefe1d91d8de709e3f631"
Expand Down

0 comments on commit a352cbb

Please sign in to comment.