Skip to content

Commit f11b9f5

Browse files
committed
Rename to UNSAFE_componentWillReceiveProps; requires `react@>=16.3.0
1 parent 01d4184 commit f11b9f5

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
### Next
22

3+
- [UPGRADE] Rename to `UNSAFE_componentWillReceiveProps`; requires `react@>=16.3.0.
34
- [UPGRADE] Remove the use of `componentWillMount` which is unsafe.
45
- [UPGRADE] Update dependencies to latest stable versions.
56
- [DEPENDENCY] Remove the `warning` dependency since function refs are now standard practice.

packages/react-css-transition-replace/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
"prop-types": "^15.6.1"
2222
},
2323
"peerDependencies": {
24-
"react": "^15.0.0 || ^16.0.0",
25-
"react-dom": "^15.0.0 || ^16.0.0"
24+
"react": "^16.3.0",
25+
"react-dom": "^16.3.0"
2626
},
2727
"devDependencies": {
2828
"babel-cli": "^6.26.0",

packages/react-css-transition-replace/src/ReactCSSTransitionReplace.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ export default class ReactCSSTransitionReplace extends React.Component {
3838
childComponent: 'span',
3939
}
4040

41-
constructor(props, context) {
42-
super(props, context)
41+
constructor(props) {
42+
super(props)
4343

4444
this.childRefs = Object.create(null)
4545

@@ -66,7 +66,7 @@ export default class ReactCSSTransitionReplace extends React.Component {
6666
this.unmounted = true
6767
}
6868

69-
componentWillReceiveProps(nextProps) {
69+
UNSAFE_componentWillReceiveProps(nextProps) {
7070
const nextChild = nextProps.children ? React.Children.only(nextProps.children) : undefined
7171
const { currentChild } = this.state
7272

0 commit comments

Comments
 (0)