Earlier quoted context omitted.
Yes, please be that guy. Or I'll do it. Vanilla Javascript refers indeed to "javascript without a framework". So creating a framework and calling it "vanilla javascript" is... wrong?
It’s 93 lines, less than most CSS resets. Small enough to copy paste to the top of your index.html in a script tag. You can use it without NPM, webpack, a special compiler pass, or a template language. Seems pretty vanilla compared to the full fat, popular alternatives.
VanJS (Vanilla JavaScript): smallest reactive UI framework
61–70 of 214 posts
Re: VanJS (Vanilla JavaScript): smallest reactive UI framework
#62Why is everybody so obsessed with size? 100kB means nothing these days.
Re: VanJS (Vanilla JavaScript): smallest reactive UI framework
#63For comparison, similar tiny JS view libraries - https://redom.js.org 2kB - https://nanojsx.io 1kB
Re: VanJS (Vanilla JavaScript): smallest reactive UI framework
#64I really don't want to be that guy, but... Vanilla JavaScript already exists as a popular term for JavaScript without any framework. No jQuery, no React - just JavaScript. Calling a library VanJS (as short for "Vanilla JavaScript") is just going to cause confusion. The repo's own description uses the phrase vanilla JavaScript in this way, and even mixes both meanings within a single sentence. If the author likes the…
Yes, please be that guy. Or I'll do it. Vanilla Javascript refers indeed to "javascript without a framework". So creating a framework and calling it "vanilla javascript" is... wrong?
> The majority of the world's vanilla is the V. planifolia species, more commonly known as Bourbon vanilla.
Re: VanJS (Vanilla JavaScript): smallest reactive UI framework
#65I really don't want to be that guy, but... Vanilla JavaScript already exists as a popular term for JavaScript without any framework. No jQuery, no React - just JavaScript. Calling a library VanJS (as short for "Vanilla JavaScript") is just going to cause confusion. The repo's own description uses the phrase vanilla JavaScript in this way, and even mixes both meanings within a single sentence. If the author likes the…
I do like the idea of it. A lot of value of React for me is in the composition model and could see this being useful for small projects
Re: VanJS (Vanilla JavaScript): smallest reactive UI framework
#66The "Hello World" example is a really good example of why React, Vue, etc are better than something more minimal like this library if you're optimizing for speed. The page will show nothing until the script runs, which requires downloading the VanJS lib and the script itself. You could inline them into the page, but that gets seriously messy at scale. A modern React app that's using some serverside rendering for the…
I'd use this to prototype a basic web interface to interact with something like an IoT device. React would be overkill, and I doubt React would be faster to render than this for that scenario.
On a slow connection, the fully rendered interface could well be more bytes than this plus some data. I would say first to render depends entirely on what you're doing.
React is used in _way_ more places than a blog or ecommerce site.
Re: VanJS (Vanilla JavaScript): smallest reactive UI framework
#67Earlier quoted context omitted.
Yes, please be that guy. Or I'll do it. Vanilla Javascript refers indeed to "javascript without a framework". So creating a framework and calling it "vanilla javascript" is... wrong?
It’s 93 lines, less than most CSS resets. Small enough to copy paste to the top of your index.html in a script tag. You can use it without NPM, webpack, a special compiler pass, or a template language. Seems pretty vanilla compared to the full fat, popular alternatives.
No it doesn't, same as "automobile" doesn't seem pretty Saturn-5, despite the fact that both are moving under their own power.
Terms have meaning, including meaning derived from communities by and large accepting that a certain term has a certain semantic meaning. And the accepted semantic meaning of "Vanilla Javascript" is "runs without a framework besides the browsers own API".
If my code works out of the box in an unmodified browser, then it is Vanilla JS. If I have to load a framework for it to work, then it isn't, period. And it matters exactly nothing whether the framework in question has 900,000 or 9 lines of code.
Re: VanJS (Vanilla JavaScript): smallest reactive UI framework
#68Earlier quoted context omitted.
I'd argue that SSR is somewhat orthogonal to React or VanJS. I don't see preliminary reasons to suspect that VanJS will be unable to plug into meta frameworks and eventually get SSR.
There's a bit of work to do to make a JS framework work server side. You need a mechanism to render in Node, which assumes you don't use any browser APIs that aren't available in whatever DOM library you use. Then you need a way to stream the HTML to the client, but that's easy with Express. Then when the page has loaded on the client you need a way to know what the server rendered and attach listeners to the reactiv…
Re: VanJS (Vanilla JavaScript): smallest reactive UI framework
#69Earlier quoted context omitted.
Yes, please be that guy. Or I'll do it. Vanilla Javascript refers indeed to "javascript without a framework". So creating a framework and calling it "vanilla javascript" is... wrong?
Suggestion: call it Bourbon JS. Wikipedia: > The majority of the world's vanilla is the V. planifolia species, more commonly known as Bourbon vanilla.
Re: VanJS (Vanilla JavaScript): smallest reactive UI framework
#70Earlier quoted context omitted.
So now we have a framework that doesn't want to be a framework? They might call it "VoidJS" instead, as in void = vacuum = so lightweight it's almost as if there's nothing there?
Or Null.js. Or undefined.js. And now I want to create a library/framework/whatever called NaN.js...