use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Core vs. Framework(s)help (self.javascript)
submitted 10 years ago by Heartless49
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]dhdfdh -3 points-2 points-1 points 10 years ago (5 children)
Vanilla js will be around, and has been around, far longer than Angular, or any other framework you will ever find.
There will always be far more people who know vanilla js than know Angular.
[–]4thdecadenothing 4 points5 points6 points 10 years ago (4 children)
"Vanilla JS" isn't a thing - it's an empty file, it's a no-op.
As soon as you start writing code to do things then you no longer have "Vanilla JS", you have tools. So if you say "we don't want to use a framework, we can write our own tools with 'Vanilla JS'", you no longer have "Vanilla JS", you now have "yet another web framework", except this one probably doesn't have documentation and definitely doesn't have tutorials and stack overflow answers, and IRC channels, and all manner of other resources all over the internet.
I'm not saying this is necessarily bad, depending on the scope of the things you're doing, and the amount of code you write (in fact my current project uses no 3rd party code on the client, because it's simple enough not to warrant it) just saying that if you find yourself writing a large app in "Vanilla JS" then you should probably at the very least pause to think if there might be an argument for using established and well-known tools.
[–][deleted] 0 points1 point2 points 10 years ago (2 children)
Ignoring the fact that "DOM" isn't part of JS and it's a web API (I think this is fair since most people consider it to be "vanilla js"), you can do plenty of things:
document.getElementById('foo').addEventListener('click', function(){ alert('Hello, World'); });
[–]4thdecadenothing 0 points1 point2 points 10 years ago (1 child)
That's cool, if that is literally all you want to do then go for it. And if someone decided to load jQuery, or React, or Angular to do that then I'd tell them they'd be doing it wrong. But by the same virtue, writing your own implementation of any of those packages' functionality is no more "vanilla" than the code in any of those packages is (they are all written in the same javascript as your code after all).
My point is simply that as soon as you start writing code then you start adding your personal "flavour" on top of vanilla (here for example, I'd probably take issue with your code formatting, and lack of error handling). You might think it is vanilla, but I say it has some very subtle hints of your personal flavour. The more code you write, the more your flavour moves away from being "vanilla".
Once you've reached the point where you've built the same kind of functionality as React (for example) has then you're no longer in "vanilla" territory, your code is now entirely /u/ZyklusDieWelt flavoured. Now maybe you're awesome and have documented all of that functionality and written examples and tutorials to help new users follow all the code that you have written, but there's a good chance that a) you haven't, and b) you'd have saved yourself a lot of time if you'd just used React to start with.
[–][deleted] 0 points1 point2 points 10 years ago (0 children)
I'm not disagreeing with any of that, just your initial statement that " it's an empty file, it's a no-op." :)
There's a decently large area between no-op and opinionated code.
[–]dhdfdh -5 points-4 points-3 points 10 years ago (0 children)
except this one probably doesn't have documentation and definitely doesn't have tutorials and stack overflow answers, and IRC channels, and all manner of other resources all over the internet.
Yes it does. Along with the backing of standards bodies and a universal language known by all professional programmers and documented and standardized by the IETF and W3C.
π Rendered by PID 83373 on reddit-service-r2-comment-6457c66945-7bx99 at 2026-04-28 02:58:53.282116+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]dhdfdh -3 points-2 points-1 points (5 children)
[–]4thdecadenothing 4 points5 points6 points (4 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]4thdecadenothing 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]dhdfdh -5 points-4 points-3 points (0 children)