|
|
|
|
|
by jemmyw
603 days ago
|
|
I find it very odd to compare with useEffect. There's a whole bunch of things you can do in code that you could do another way, or might not be advisable for particular circumstances. And that's just about the only thing linking useEffect, a function call in React for component lifecycle, with class methods. I don't think it's a good idea to think about these two things in the same way. |
|
When I see useEffect, a little alarm goes off in my head telling me that it's worth exploring alternatives. I was hoping to give folks that same instinct for class methods. Didn't intend to imply that they performed similar functions, sorry if that's how you received it!