Recently some one asked me this question why we use vanilla not jquery and other third party tools in some cases.
This is not like that we have some specific reasons to use it or to not use it.
Why to Use :
- Ops/Sec :
2. Page Size :
Suppose you just want to toggle something on your page. Just to perform this operation you may use jquery or other library but before performing the operation you are required to fetch the actual jquery library. which is of no use to you.
3. Official Modules :
4. Suitable for Module Writing :
The modules which are part of npm are mostly built in vanilla just because they don’t want any third party dependency of frameworks.
Why not to Use :
- Cross Browser Issue :
You may face cross browser issues which are very time consuming to handle. that’s why these library are in the market to save you time.
2. Helper Library :
There is no helper library support available in the Vanilla.js so you may have to code most of the things yourself.