Re:Show HN: Tired of logic in useEffect, I built a class-bas...
by kretaceous on Wednesday April 08, 2026 @08:05PM
(#47697745)
Can you give examples of how they are different? I've only done OOP in JS so I'm not aware of what I'm missing or what's supposed to be different.
JavaScript gives you a class syntax that lets you make classes and extend them from each other, and for the most part they will work the same way as a class from a language like Java ... but some things won't.
You can either become an expert on prototype chains, and how JS actually implements OOP (differently from Java) ... or you can just write factory functions instead of classes.