TheDuffmaster@lemmy.world to Programmer Humor@lemmy.ml · 7 months agoSwitching to OCaml boislemmy.worldimagemessage-square79fedilinkarrow-up1392arrow-down123
arrow-up1369arrow-down1imageSwitching to OCaml boislemmy.worldTheDuffmaster@lemmy.world to Programmer Humor@lemmy.ml · 7 months agomessage-square79fedilink
minus-squareSubArcticTundra@lemmy.mllinkfedilinkarrow-up3arrow-down5·7 months agoIt becomes quite OOP if you use it with React
minus-squareel_abuelo@lemmy.mllinkfedilinkarrow-up13·7 months agoHuh? I’ve worked with TypeScript + React for the last 5yrs and the only time I see OOP is when someone’s done something wrong. Maybe you’re thinking of old react with class based components?
minus-squaretoastal@lemmy.mllinkfedilinkarrow-up2arrow-down1·7 months agoProving that adding the class keyword to the ECMAScript spec was a mistake that leads folks down a path they should not travel 🙃
minus-squareel_abuelo@lemmy.mllinkfedilinkarrow-up2·7 months agoI completely agree. I taught JS/TS for 5yrs and I always emphasised that the ‘class’ keyword was just syntactic sugar for what was already available in prototype inheritance of JS.
It becomes quite OOP if you use it with React
Huh? I’ve worked with TypeScript + React for the last 5yrs and the only time I see OOP is when someone’s done something wrong.
Maybe you’re thinking of old react with class based components?
Proving that adding the
class
keyword to the ECMAScript spec was a mistake that leads folks down a path they should not travel 🙃I completely agree. I taught JS/TS for 5yrs and I always emphasised that the ‘class’ keyword was just syntactic sugar for what was already available in prototype inheritance of JS.