Skip to content

Commit

Permalink
feat: Support react 18 (#607)
Browse files Browse the repository at this point in the history
  • Loading branch information
pckilgore authored Jan 15, 2023
1 parent 1e891d0 commit 58dec44
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
"prettier-stylelint": "^0.4.2",
"prop-types": "^15.6.0",
"raw-loader": "^0.5.1",
"react": "^16.0.0",
"react": "^16.3.0",
"react-dom": "^16.0.0",
"react-story": "^0.0.10",
"rimraf": "^2.6.1",
Expand All @@ -116,7 +116,7 @@
"why-did-you-update": "^0.1.1"
},
"peerDependencies": {
"react": "^16.0.0 || ^17"
"react": "^16.3.0 || ^17 || ^18"
},
"ava": {
"files": [
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@ class DropdownTreeSelect extends Component {
}
}

componentWillMount() {
UNSAFE_componentWillMount() {
this.initNewProps(this.props)
}

componentWillUnmount() {
document.removeEventListener('click', this.handleOutsideClick, false)
}

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
this.initNewProps(nextProps)
}

Expand Down
2 changes: 1 addition & 1 deletion src/tree/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Tree extends Component {
}
}

componentWillReceiveProps = nextProps => {
UNSAFE_componentWillReceiveProps = nextProps => {
const { activeDescendant } = nextProps
const hasSameActiveDescendant = activeDescendant === this.props.activeDescendant
this.computeInstanceProps(nextProps, !hasSameActiveDescendant)
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9850,7 +9850,7 @@ react-test-renderer@^16.0.0-0:
react-is "^16.8.6"
scheduler "^0.13.6"

react@^16.0.0:
react@^16.3.0:
version "16.8.6"
resolved "https://registry.yarnpkg.com/react/-/react-16.8.6.tgz#ad6c3a9614fd3a4e9ef51117f54d888da01f2bbe"
dependencies:
Expand Down

0 comments on commit 58dec44

Please sign in to comment.