2 ms·
What specifically are you referring to? The original `createClass` API was indeed deprecated and removed all the way back in 2017 [0]. You can still use them t
by acemarke 2y ago
What specifically are you referring to?
The original `createClass` API was indeed deprecated and removed all the way back in 2017 [0]. You can still use them today with the separated `create-react-class` package.
ES6 class components still work as-is even in React 19 - it's just the legacy context feature that's been removed. They're generally discouraged, in that function components are now the standard way to use React, but they're still not "deprecated" in the sense of a warning or removal.
[0] https://legacy.reactjs.org/blog/2017/09/26/react-v16.0.html#packaging https://legacy.reactjs.org/blog/2017/09/26/react-v16.0.html#...
- veidelis 2y agoThey deprecated AFAIR 3 methods on class components and the docs about class components under "Legacy React APIs" say that it's a pitfall to use class components.
- alexanderchr 2y agoYeah they deprecated those three methods a long time around (sometime around 16.3 I think) yet they are still around in 19.0 (with an UNSAFE_ prefix). Regarding class components in general, what is the problem with maintainers choosing to encourage devs to use their new APIs while keeping the old APIs working?