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.
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.
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 further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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.
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.
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.