Consider dropping support for React versions <= v16
Currently, the package.json file notes the following React peer dependencies:
"peerDependencies": {
"react": "^0.14.0 || ^15.0.0 || ^16 || ^17 || ^18",
"react-dom": "^0.14.0 || ^15.0.0 || ^16 || ^17 || ^18"
},
v15 and v16 were released in 2017 (seven years ago) and v0.14.0 is from 2015 (nine years ago).
It seems fair to drop at least v0.14.0 and v15 in the next major release for react-modal. (To be explicit at the risk of being pedantic, updating peer dependencies is generally considered a breaking change... even when the peer dependencies are ancient.) 😃
Dropping support for React v16 seems reasonable too, though it may be nice to support that one through v4 if we feel there are time/resources to do so.
Note that https://github.com/reactjs/react-modal/issues/1019 raises some issues with react-modal compatibility with React v18. These are particularly tricky as it'll require some care to ensure the fixes work for v17.
I'm against dropping support if it's not necessary. But I also don't have a plan right now.
Maybe, first, we need to understand what's going on with #1090 to see if we need to really make that breaking change.
From what I can see, it's just a matter of adding startTransition on the users' side (but I might be wrong - radiohead 🎵).
But I also wouldn't oppose if we can speculate on the adoption of versions 16.3+ (yep, exactly 16.3 up)
I think I'm being super defensive about this.
Maybe, the obsolete class component is dragging this project down.
It'd be nice to set a millestone for this changes as we have more people working on this project.