Live data from Hacker News

Show HN: HyperApp – 1k JavaScript framework for building web applications

github.com

131–140 of 169 posts

Re: Show HN: HyperApp – 1k JavaScript framework for building web applications

#131
post #49

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

That looks awfully complicated.

Re: Show HN: HyperApp – 1k JavaScript framework for building web applications

#132

Earlier 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.

New object => new pointer.

Re: Show HN: HyperApp – 1k JavaScript framework for building web applications

#133
post #77

In 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.

True, but by passing the same object as an attribute to a pair of Mithril components, I can have them share state. (Can be restricted to the scope of a parent component if desired.) Is there an additional requirement for compound components?

Re: Show HN: HyperApp – 1k JavaScript framework for building web applications

#134

Earlier 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…

[deleted]

Re: Show HN: HyperApp – 1k JavaScript framework for building web applications

#135
post #49

Earlier quoted context omitted.

You might be interested in skipping Redux and just using a state pattern like this http://meiosis.js.org

That looks awfully complicated.

Sorry is that sarcasm? 3 lines of code for a state pattern. Redux is the one that's awfully complicated.

Re: Show HN: HyperApp – 1k JavaScript framework for building web applications

#136
post #135

Earlier 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.

Sorry, no, it's my honest opinion. I am the kind who is more interested in ideas and patterns than in libraries or frameworks, so I had a look, but this looks like the typical work of a design-disabled programmer. I am not saying that is garbage, but I don't like neither the execution or API design.

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

#137
post #135

Earlier 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.

> Think Redux, MobX, Cerebral, React Context, etc. but without having library imports everywhere and being tied to a framework API. Instead, just plain functions and objects.

Undelivered promise.

Re: Show HN: HyperApp – 1k JavaScript framework for building web applications

#138

Earlier 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.

> Hyperapp is Elm for the rest of us.

Curious who you think Elm is for?

Re: Show HN: HyperApp – 1k JavaScript framework for building web applications

#139

If 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.…

Template strings loses all the actual benefits of JSX, in that you can have your editor parse it for validity and type hinting in the same way as if it was all createClass class (but more convenient).
Post reply on HN