Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Minimum react 18 support #607

Merged
merged 1 commit into from
Jan 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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