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

Drop support for React 16 #7350

Open
ggdouglas opened this issue Mar 13, 2025 · 0 comments
Open

Drop support for React 16 #7350

ggdouglas opened this issue Mar 13, 2025 · 0 comments
Assignees
Labels
dependencies Pull requests that update a dependency file
Milestone

Comments

@ggdouglas
Copy link
Contributor

ggdouglas commented Mar 13, 2025

Drop support for React 16/17 and update peerDependencies across packages.

In package.json:

"peerDependencies": {
"@types/react": "^16.14.41 || 17 || 18",
"react": "^16.8 || 17 || 18",
"react-dom": "^16.8 || 17 || 18"
},

"peerDependencies": {
"@types/react": "^16.14.41 || 17",
"react": "^16.8 || 17",
"react-dom": "^16.8 || 17"
},

"peerDependencies": {
"@types/react": "^16.14.41 || 17 || 18",
"react": "^16.8 || 17 || 18",
"react-dom": "^16.8 || 17 || 18"
},

"peerDependencies": {
"@types/react": "^16.14.41 || 17 || 18",
"react": "^16.8 || 17 || 18",
"react-dom": "^16.8 || 17 || 18"
},

"peerDependencies": {
"@types/react": "^16.14.41 || 17 || 18",
"react": "^16.8 || 17 || 18",
"react-dom": "^16.8 || 17 || 18"
},

"peerDependencies": {
"@types/react": "^16.14.41 || 17 || 18",
"react": "^16.8 || 17 || 18",
"react-dom": "^16.8 || 17 || 18"
},

"peerDependencies": {
"@types/react": "^16.14.41 || 17 || 18",
"react": "^16.8 || 17 || 18",
"react-dom": "^16.8 || 17 || 18"
},

"peerDependencies": {
"react": ">=16.8",
"react-dom": ">=16.8"
},

Also these references:

/**
* ReturnType here preserves type compatability with React 16 while we migrate to React 18.
* see: https://github.com/palantir/blueprint/pull/7142/files#r1915691062
*/
// TODO(React 18): Replace return type with `React.ReactNode` once we drop support for React 16.
<T extends Element = Element>(props: IconProps<T>): ReturnType<React.FC<IconProps<Element>>> | null;

/**
* ReturnType here preserves type compatability with React 16 while we migrate to React 18.
* see: https://github.com/palantir/blueprint/pull/7142/files#r1915691062
*/
// TODO(React 18): Replace return type with `React.ReactNode` once we drop support for React 16.
<T extends Element = Element>(

// HACKHACK: type fix for setState which does not accept partial state objects in our version of
// @types/react (v16.14.x)
public setState<K extends keyof S>(

@ggdouglas ggdouglas added the dependencies Pull requests that update a dependency file label Mar 13, 2025
@ggdouglas ggdouglas added this to the 6.0.0 milestone Mar 13, 2025
@jscheiny jscheiny self-assigned this Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

2 participants