Show HN: 1 KB JavaScript framework for building front-end applications
1–10 of 44 posts
Re: Show HN: 1 KB JavaScript framework for building front-end applications
#2Show HN: 2 MB JavaScript library for building front end applications with a lot of useful interactive ui components.
Re: Show HN: 1 KB JavaScript framework for building front-end applications
#3I want to see the trend of maximal libraries in javascript now. Show HN: 2 MB JavaScript library for building front end applications with a lot of useful interactive ui components. like https://github.com/nlp-compromise/compromise
Re: Show HN: 1 KB JavaScript framework for building front-end applications
#4Re: Show HN: 1 KB JavaScript framework for building front-end applications
#5So I'm looking at the example JS snippet and suddenly it embeds HTML in the middle. Can someone who knows current JS explain how this even parses?
Re: Show HN: 1 KB JavaScript framework for building front-end applications
#6So I'm looking at the example JS snippet and suddenly it embeds HTML in the middle. Can someone who knows current JS explain how this even parses?
Re: Show HN: 1 KB JavaScript framework for building front-end applications
#7So I'm looking at the example JS snippet and suddenly it embeds HTML in the middle. Can someone who knows current JS explain how this even parses?
That code is not directly consumed by the browser, instead, it's compiled into the code below by a compiler like Babel, minified and bundled into a tiny blob of code we ship to the browser.
app({
state: {
count: 0
},
view: (state, actions) =>
h("main", {}, [
h("h1", {}, [state.count]),
h("button", { onclick: actions.down }, "-"),
h("button", { onclick: actions.up }, "+"),
]),
actions: {
down: state => ({ count: state.count - 1 }),
up: state => ({ count: state.count + 1 })
}
})
So, I used JSX for "familiarity", but you don't need to use it to build your own apps. You can just write the code shown in the snippet above and you'd do just as well. You can also minimize and bundle your code to tap into the JavaScript ecosystem, code using a modular style and still not have to use JSX at all.Hope that helps :)
Re: Show HN: 1 KB JavaScript framework for building front-end applications
#8Re: Show HN: 1 KB JavaScript framework for building front-end applications
#9Dupe: https://news.ycombinator.com/item?id=14629414
Re: Show HN: 1 KB JavaScript framework for building front-end applications
#10I want to see the trend of maximal libraries in javascript now. Show HN: 2 MB JavaScript library for building front end applications with a lot of useful interactive ui components. like https://github.com/nlp-compromise/compromise
The fight for really small frameworks is most relevant for consumer apps, especially ones consumed on mobile.
But even on mobile, it's primarily relevant because customers get minimal value from your app or are bad at accurately assessing the value they get.
In my day job, I work on a system where business users spend several hours a day using it. Loading a MB of minified JS has such a limited effect on the overall time it takes users to get their work done, it's almost irrelevant. Though, per the point about accuracy above, I wonder how it affects our demos.