For people just starting React today, are classes worth learning anymore


For people just starting React today, are classes worth learning anymore? My take: Probably not.

I can only think of 2 reasons to learn classes today.

1. Using React 16.7 (before hooks existed)
2. Supporting existing app with classes

Can you think of other reasons?

#reactjs

And thanks to @brian_d_vaughn good work, you don't even need to use classes to declare an error boundary: https://github.com/bvaughn/react-error-boundary

So, I don't see any more good reasons to use a class anymore.

View original on X