what is vanilla js
Javascript Web Development

What is Vanilla JS

“What is Vanilla JS?”

You might have heard about Vanilla JS many times if you are a web developer. When I heard it at first, I was thinking to myself “Oh, it must be another cool JS framework or library with delicious name”. And then when I tried to Google it to check it out, turns out I was dead wrong.

Most people think of Vanilla in noun form like “Ice cream flavored with vanilla”

But vanilla in adjective form have completely different meaning

vanilla adjective (informal)
1.having no special or extra features; ordinary or standard.

Yes you are correct! Vanilla JS is just a joke. A sophisticate (or sarcastic) term to call pure javascript.

But I do understand why. These days, there are tons of javascript framework and library available for you. And they are good too! So why writing your own code when you can use the plugin and be done with it? And the stats below confirmed

jquery usage stat
Usage of JavaScript libraries for websites – March 2017 (w3Techs.com)

Around 75% of all websites out there use at least 1 javascript library or framework. No surprise, however, one might forget that many things can be done nowadays without the need for additional JavaScript libraries. Once, I saw my junior colleague include the whole JQuery library just to select the DOM element by ID. I asked him why during the peer code review. He said – “I don’t know, we always select the element with jQuery selector. I just didn’t feel right if I switch back to native”.

Don’t get me wrong. I’m not against using libraries. (In fact, I used them a lot) But with ES6 javascript, we can do plenty things with it without having extra libraries. And using vanilla JS helps your page to load/process a bit faster too!

Lastly, there are people who even go far to setup a kind of official library page for vanilla JS with tutorial!! Check the video below. It’s pretty funny I must say 🙂

Let me know your thought about this. And don’t forget to subscribe to our channel to stay tune.

Vanilla JS page: http://vanilla-js.com/
Red Stapler Channel: http://www.youtube.com/c/RedStapler_channel

Leave a Reply

Your email address will not be published. Required fields are marked *

error: