3 ms·
> With vanilla JS it's the wild west The thing I really, really like about Vanilla JS is that it has 0 (zero) dependencies. If something breaks in Vanilla JS,
by rikroots 7y ago
> With vanilla JS it's the wild west
The thing I really, really like about Vanilla JS is that it has 0 (zero) dependencies.
If something breaks in Vanilla JS, you know with 100% certainty that it's your code that's failing. With a framework, it's mostly the fault of your code - but there's always an outside chance that it's somebody else's fault, buried deep in some 3rd party dependency that may-or-may-not have been maintained.
I like React and Vue (I love Svelte!) - on a well-planned project they can perform miracles. But I see no reason to hate on Vanilla: it has its place too ... if you know what you're doing.
- bgirard 7y ago> If something breaks in Vanilla JS, you know with 100% certainty that it's your code that's failing. Or the browsers' code which is a bigger problem. I've been burned in the distant past by a blackbox framework that didn't work well with my use case (JSF) so I can sympathize with your position. These days I'd rather hit the occasional framework and polyfill bug than deal with a wide range of interopt issues.
- nicoburns 7y ago> If something breaks in Vanilla JS, you know with 100% certainty that it's your code that's failing. If you're lucky enough to have the same developers for the duration of the project. Otherwise it'll be your predecessor who worked at the company 4 years ago's code. I've had to do far too much "reverse engineering" of "we don't touch that" code. On the other hand, I've literally never encountered a bug in React. I guess it must have them. But I think not all that many.
- rikroots 7y agoI don't disagree. I still live in hope that one day I'll work on a project where all functions and variables have relevant and informative names and the Runbook is (accurately!) updated with latest changes on a weekly basis. The point I was trying to make wasn't about previous developers on a project. Rather, it's the way frameworks ask me to trust them about the choices made by unknown developers to include NPM packages by other unknown developers in the framework's build. That, to me, is the definition of "wild west". React is backed by Facebook. When it comes to frameworks I'm a lot happier to trust an open-sourced codebase backed by a company with a big vested interest in making sure that all the NPM modules they include (and all their dependencies, etc) are solid, safe and up-to-date. Even so, React's package.json file lists a devDependency for core-js - whose main developer is currently serving 18 months in a Russian jail[1]. How much trust we choose to put into other, unknown developers and their code is a risk to any project, is all I'm saying. [1] https://www.theregister.co.uk/2020/03/26/corejs_maintainer_jailed_code_release/ https://www.theregister.co.uk/2020/03/26/corejs_maintainer_j...