Never underestimate the power of simplicity. It's hard to imagine the application of concepts like push real-time notifications, using databases, h...
For further actions, you may consider blocking this person and/or reporting abuse
Vanilla js librairies, how does that makes sense ?
I thought vanilla was js precisely without libs
This totally makes sense to me in a matter that the "library" doesn't have any other dependencies like jQuery, React/Vue, etc. i.e. if you're familiar with JS you can just get the library and start using it without cognitive overload by finding that you also have to use that on a specific platform only, having other packages installed and be in a parallel universe.
This totally makes sense to any seasoned developer or any backend developer. But frontend developers nowadays have a mess in their heads. They believe that React is a library because they thought to believe this. Therefore they don't understand completely what a library actually is. Hence a comment: "Vanilla js librairies, how does that makes sense ?" with 17 likes. Awful.
Kindly please describe what is a library to you, their might be an interesting discussion here.
If we take the example of the editor.js "library":
The line between library and framework is a bit fuzzy, I would still consider react a framework because it is how people use it and arguably the recommanded way to use it.
My message was not about react being a lib, more than using huge library not the spirit of what I would call vanilla JS.
It is not fuzzy and it never was. It always was simple and clear. It became fuzzy when promoters of React decided to call it "library".
A library is just a set of methods/functions regardless of its size. It can be GB in size and it still will be the library. Editor.js is a perfect example of a library. Another one jQuery - 30,000 plugins and why it even matters?
Framework on another side can be several lines of code, but still, be a framework just because it requires your code to be written in a certain way. React which requires extending classes and implementing methods is a perfect example of a framework.
General principle:
Your code calls the library, but the framework calls your code.
Speaking of "Vanilla JS", "Vanilla JS" is a part of jQuery hate strategy invented by the same frauds who call React the library.
The power of a language is in its libraries and frameworks. "Vanilla JS" is nonsense, the same way as "Vanilla Java" or "Vanilla Python". We just need to call libraries - libraries and frameworks - frameworks and use them where they make sense.
Thanks bigbott, I was skimming the comments and thinking “please tell me SOMEONE knows what a library is! Big ol bundle of code!”
Maybe people don’t “need” to learn C++ but I swear a week with it and people wouldn’t be confused by stuff like the idea of a “library” that is just a big block of text.
It’s almost like how a real library is a place that holds lots of useful information data and methods to achieve things. Weird, right? 😜
My exact thought.
I guess, it means it doesn't require some framework like React, Angular, Vue, JQuery, etc.
JQuery isn't really a framework though, yet I'd still consider it non vanilla JS.
I get that there might be an established definition of Vanilla JS. But isn't Vanilla JS libraries just JS functions packaged together. I don't see much of a difference between keeping the JS all in one file, vs storing it in another module and importing it.
With this definition then libraries like Vue and React are "Vanilla JS" libraries.
Yeah good point. I think of React as non-vanilla because of how many layers of abstraction it has. But I guess ultimately, if there's even one layer of abstraction, like packaging a one-liner into a library, then it might as well be considered non-vanilla.
For me the difference is, directly using the browser API and writing code just for your needs and understanding the API behind the code.
In a way, react can be use as just a vanilla JS library in that case, you don't even need to write JSX and can use it for some elements only... It's probably lighter than some of the libraries listed in this article.
Because you can use them with vanilla JS, w/o dependencies nor supersets.
Vanilla JS is when you don’t abstract away to a framework like React or JQuery etc... You can still use libraries.
I don't think that's necessarily the case - I always thought that it means without the prerequisite of a framework like Angular or library like React...
What about popper.js? I think it makes tool-tips easy.
Cool, thanks for your suggestion. Will definitely try it
Nice article!
Also, tippy.js for tooltips and popovers
I think having the title "Vanilla JS" is misleading here. Vanilla JS usually means using methods and features natively available in most browsers and included in the standard of ECAMScript without importing external libraries. This is a good post about libraries you recommend (and these are all great libraries) but there is not really such thing as a Vanilla JS library IMO.
French Vanilla JS then. 🙄
Yikes, these comments are a bad take. Great article!
It looks like there are a ton of developers out there who don't see the difference between libraries built (or adapted) to work with frameworks and libraries built to work in non-framework-dependent environments.
These look like great libraries, thanks for sharing! I was actually looking for an Editor for my webapp so I'll give EditrJS a try!
PS. Shame on everyone in the comments hating on the title for no reason, devs can be a pain in the a sometimes.
Thanks, I was looking for a push notification to add to my current side project and slides to my personal site. Btw Great work keep it up!
Thank you!
Thanks for the share
You're welcome
Great stuff - thanks!
I'd always recommend against Chart.js just because it produces an innaccessable mess. Charts built using HTML5 canvas are problematic anyway, just because they only ever expose a single DOM node which makes it impossible to provide a proper alternative to screen readers. Chart.js goes further though, and just doesn't provide anything as alternative text.
Effectively, it's just giving a big middle finger to anyone who's relying on a screen reader to browse the web.
Cool libraries. Thanks for sharing!
You're welcome!
Came for the comments and ensuing firestorm over "Vanilla JS" and "Library" in the same sentence.
Was not disappointed. 🔥 🔥 🔥
EditorJS and PushJS seem to be quite cool, never tried them
Hey I tried some of these before
Great! If you have something in your list which is not there in this post please do share.
Thanks, this will help.
I'm glad.
I suggest adding Swiperjs, a very handy slide library :D