Side question: Isn't it grossly inefficient that in Redux, you have reducers that return an entirely new state object? Wouldn't it be better to return some kind of data that represents just the diff you intend to make, like {op: INCREMENT, arg: 1, key: "Foo"}?
You might be interested in skipping Redux and just using a state pattern like this http://meiosis.js.org
Show HN: HyperApp – 1k JavaScript framework for building web applications
131–140 of 169 posts
Re: Show HN: HyperApp – 1k JavaScript framework for building web applications
#132Earlier quoted context omitted.
Objects in JavaScript are references so internally it's just a pointer being passed around.
Hmm, but reducers are supposed to return references to new state objects, right? So clearly something more substantial than a pointer has to be created/duplicated.
Re: Show HN: HyperApp – 1k JavaScript framework for building web applications
#133In the same vein there's Mithril. It's 8kb but includes a router and a fetch polyfill! I love these little JS frameworks :) https://mithril.js.org/
Mithril is nice. One downside is it doesn't lend itself really well to compound components. Everything has to be passed down through attributes.
Re: Show HN: HyperApp – 1k JavaScript framework for building web applications
#134Earlier quoted context omitted.
Some of those results refer to HyperTerminal, the Electron-based terminal app. Other results refer to Hyperapp-like libraries (not Hyperapp). The most recent submission related to Hyperapp was 8 months ago and Hyperapp has come a long way since then. Here is another angle to this: go into React type of submissions and ask them to stop spamming HN with that? https://hn.algolia.com/?query=react&sort=byPopularity&prefix…
You are a joke. Show HN: 1 KB JavaScript library for building front end apps 242 points jbucaran 8 months ago 2 comments ( https://github.com/jbucaran/hyperapp ) Show HN: 1 KB JavaScript framework for building front-end applications 216 points jbucaran 8 months ago 42 comments ( https://github.com//hyperapp/hyperapp ) Show HN: 1kb JavaScript library for building front end applications 187 points jbucaran a year ago 4…
Re: Show HN: HyperApp – 1k JavaScript framework for building web applications
#135Re: Show HN: HyperApp – 1k JavaScript framework for building web applications
#136Earlier quoted context omitted.
That looks awfully complicated.
Sorry is that sarcasm? 3 lines of code for a state pattern. Redux is the one that's awfully complicated.
Redux can be complicated, but Redux is way simpler and easier to reason about than the Meiosis patterns.
Re: Show HN: HyperApp – 1k JavaScript framework for building web applications
#137Earlier quoted context omitted.
That looks awfully complicated.
Sorry is that sarcasm? 3 lines of code for a state pattern. Redux is the one that's awfully complicated.
Undelivered promise.
Re: Show HN: HyperApp – 1k JavaScript framework for building web applications
#138Earlier quoted context omitted.
Just curious what intrigues you about this framework in ways that React does not?
Hyperapp is Elm for the rest of us. I wouldn't compare it to React as they are solving slightly different problems. Hyperapp's state management is built-into the framework. In this way, Hyperapp is a tad more "high-level" (abstract) than React.
Curious who you think Elm is for?
Re: Show HN: HyperApp – 1k JavaScript framework for building web applications
#139If you're interesting in a reactive template library that doesn't require a compiler for non-standard JavaScript syntax, check out a library I've been working on for a little while now, lit-html: https://github.com/Polymer/lit-html Where JSX would look like this: const view = (state, actions) => ( {state.count} actions.down(1)}>- actions.up(1)}>+ ) The lit-html would be: const view = (state, actions) => html` {state.…