conmigo | 5 years ago | on: What I wish I knew about React
conmigo's comments
conmigo | 5 years ago | on: What I wish I knew about React
Please tell me how you'd change a to 1 in this example:
const a = 0;conmigo | 5 years ago | on: Internet Explorer Is Evil (2002)
No, MS became more cunning and evil, they've moved al those practices to their OS.
conmigo | 5 years ago | on: Porting a React Front End to TypeScript
Besides that, I've never been a Microsoft fanboy(to say the least) and it's worrying me that almost the entire JS eco system falls in the hands of that company; Github, VSCode, Typescript, NPM, etc.. Am I alone in this?
There is so much good stuff in the JS world, but we seem to adhere to a few companies and a few systems more and more. Being a 'Javascript' developer today only has very little to do with Javascript. It's about React, Redux, Hooks, ESLint, Prettier, Typescript, etc.. Oh, and don't forget to do it Agile, another joy and productivity killer. And when you don't agree with this stack you're either not so smart or still need to learn to 'understand' it.
No, it's not. React is iterating that piece of code of your function internally to modify the value of the const, there is no other way to do it. And it is especially confusing because you can use that const 'variable' in the scope representing a changing value. And the change is magically made by its 'setState' method.
If you do this yourself in a loop then it is of course totally clear what's going on, but now we're writing functions where parts of it are being iterated by React, and that's not functional at all, IMAO it's a hack.