3 days ago by PufPufPuf

I have tried Hyperapp some time ago. It's usable for small apps, but the lack of ecosystem makes it unfit for anything larger -- as is usual for all niché JS frameworks.

Funnily, the "ecosystem" page contains just Lorem Ipsum (https://hyperapp.dev/ecosystem) and the Awesome Hyperapp section for V2 is almost empty (https://github.com/jorgebucaran/awesome-hyperapp)

3 days ago by foobarbecue

Is niché a portmanteau of niche and cliché?

3 days ago by bigblind

No, it's niche with a French accent

3 days ago by sqrt17

Fun fact: niche is a French word that doesn't have an accent. So niché is the heavy metal ümlaut version.

3 days ago by slim

niche with a french accent sounds like the "nish" in "varnish".

3 days ago by Uehreka

It’s pronounced “NEE-chuh”.

3 days ago by escapecharacter

Like Nietzsche?

3 days ago by pkghost

Good content.

3 days ago by jorgebucaran

We're so close to the official V2 release, but there are still issues. I'll make sure to fix most by then. You totally have a point about the lack of an ecosystem, but building one is where the fun is. I am sure we'll get there! Thank you for your feedback.

3 days ago by ricardobeat

It's been like that for months - seems like the project is not seeing the activity they expected for v2.

Also server-side routing is broken and that link will not work.

3 days ago by jorgebucaran

We are very close to the official V2 release, but right now that page is still a WIP.

The link works fine, though.

3 days ago by satyrnein

Also, if you click "join us" and then "tutorial" your scroll position is in an unexpected place.

3 days ago by dsissitka

It’s broken here too.

3 days ago by vages

The link does not work.

3 days ago by HHalvi

Their guide (https://hyperapp.dev/guides) page is also filled with Lorem Ipsum.

3 days ago by jorgebucaran

Ouch, yes, that's also a WIP, thank you for checking in, though.

3 days ago by bigblind

The quickstart is quite clear, but I'd love to see some slightly larger examples like, how is state passed between components? How do event handlers work? The API page seems sparse as well.

But it looks like a great start

3 days ago by mr0010110fixit

So I have extensively used hyperapp (1 and 2) for hybrid mobile applications that run the cab of big rigs. We actually won best in show this year at Freight Waves for our two apps.

These are medium/larger apps, with lots of functionality, need to hook into native device features (done with ionic capacitor, and custom plugins), and need to be fast, robust, and flexible. Hyperapp has allowed all of those things.

Hyperapp can and will work, with larger applications, but hyperapp does not have super strict "guide rails" like other more popular frameworks do, so its up to you to design, and implement a clean code base. It ships with minimum overhead, and you can either roll features you need, or see if someone in the community has created them.

I have worked with angular (1,2,4,6) and react for quite a few projects, and I actually work faster, and end up with a better end product using hyperapp. Its an amazing little framework. Sure, not having stricter guide rails you can write very poor apps in hyperapp, it will let you do stuff poorly, but if you play to its strengths, and get comfortable with it, it really shines.

3 days ago by keb_

Hey there, really happy to hear of the success you've had with Hyperapp. I've played with Hyperapp v1 in the past for small toy projects, and it was relatively easy to become productive with. I'm wondering if you have any open toy projects or boilerplate you could share for v2, as I'm looking to jump back on it when I get the chance, and would love to see what a scalable project skeleton looks like.

3 days ago by mr0010110fixit

I do not have anything that is open as of now (but about to start a new project soon)

I would check out https://medium.com/hyperapp/a-walk-through-hyperapp-2-b1f642...

to get your toes wet though, good resource, also feel fee to join the hyperapp slack https://hyperappjs.herokuapp.com/ nice community and super helpful.

3 days ago by mrozbarry

Bit of a Hyperapp fanboy here, so bare with me.

First, I think Hyperapp can make both small and big applications, opposed to u/PufPufPuf's opinion. A lot of people have this opinion because they are more familiar with v1's wired-in actions, which can become quite unruly. In the latest version, actions are decoupled, and can be organized/extracted however you see fit.

I've made a handful of applications in both v1 and the current released Hyperapp, and they work very well. If you want to see the latest Hyperapp in action, you can check these out:

- A timer for mob programming: https://github.com/mrozbarry/mobtime

- A canvas game, using Hyperapp for dom/state: https://github.com/mrozbarry/smash

- A router for Hyperapp: https://github.com/mrozbarry/hyperapp-router

I have a handful of older youtube videos regarding v1, you can check them out here:

- Intro to Hyperapp (v1): https://youtu.be/uWIyjI8nkz0

- Hyperapp (v1) forms and localstorage: https://youtu.be/qpt6aaMxm1E

- Unit testing hyperapps (v1): https://youtu.be/5wvPUj--HaA

Note, they are outdated, but there isn't much on youtube about Hyperapp in general.

One thing to keep in mind is the naming. A lot of people talk about "Hyperapp" as the first version, and "v2" as the current version, but this is wrong. It's more like "v1" (legacy) and "Hyperapp" (current). It gets confusing, because not everyone is on the same page with that, but this the the naming Jorge (primary author/creator of Hyperapp) has mentioned several times.

3 days ago by franciscop

> "A lot of people have this opinion because they are more familiar with v1's wired-in actions, which can become quite unruly."

u/PufPufPuf only mentions the lack of ecosystem, nothing about the wired-in actions/etc, so it's odd that you defend v1 vs v2 instead of the lack of ecosystem here. This should probably have been a reply to that thread as well because otherwise it's two very unrelated comments in the list.

2 days ago by mrozbarry

Yeah, I should have split things into a reply and a separate thread for the other stuff. That said, I didn't have any comment on the ecosystem - there's definitely a lack of userland things for Hyperapp, and that's for a number of reasons, the biggest being the latest is still in a bit of a transition period from v1, and as a community we didn't think someone would be posting about Hyperapp and make it to the top of hacker news. That really put us on the spot to try and get on here and explain the state of Hyperapp since we're probably more in a release candidate/late-beta situation rather than a full blown release.

3 days ago by carapace

( s/bare/bear/ )

3 days ago by mrozbarry

You are absolutely correct!

3 days ago by paultannenbaum

Your mobtime app does not look like it was built with hyperapp, but instead is using ferp.

2 days ago by mrozbarry

While the backend (src directory) is certainly ferp, the frontend (unbundled js in public) is 100% Hyperapp.

3 days ago by Shish2k

Been using this for a while and loving it - it feels like functional programming for GUIs (“describe what you want the end result to look like, and the framework makes it happen” as opposed to “describe what steps to execute”).

I’m pretty sure a lot of frameworks have similar mindsets, but Hyperapp is the one that I found works with the fewest headaches :P (as opposed to eg React, where I spent hours simply trying to untangle the knot of thousands of dependencies before I could get step 1 of the quickstart tutorial to compile...)

As an example of how trivial problems require trivial code:



3 days ago by ptu

I'm a big re-frame fan from the Clojurescript world so this all looks rather familiar. For me it's a great framework and worth learning Clojurescript for.

Seeing the h() function makes me realise how much I miss Hiccup syntax for HTML and your component tree, especially with editor support for parens it's a joy. But it looks nicer than JSX.

I'm going to give Hyperapp a try, I like the small size aspect especially, and familiarity of the overall architecture, my fear is that if you're going off-piste enough to avoid the React/Angular well trodden track on an app, you might as well go the whole way and use Re-frame which is very pragmatic, with JS interop it's possible to do pretty much anything you want. And whilst the type system and compiler of Elm is nice, the slightly more 'infamous' parts of restrictions to JS extensions make it more limited in the real world.

3 days ago by beders

Someone got inspired by re-frame, I see :) I like the approach. Wondering if there's a way to get ever closer to hiccup (without having to resort to JSX)

Also, letting the framework decide if a function inside the markup should be called or not gives opportunity for more optimizations that go beyond VDOM diffing. That would require an even more declarative approach.

i.e. [h1, {}, [MyComponent, {}]]


h("h1", {}, MyComponent({}))

If the framework figures out that MyComponent wasn't changed, it can re-use the VDOM nodes.

3 days ago by jorgebucaran

Yep, there's a feature called Lazy (will be renamed to memo for the official release) that allows you to do just that! :)

3 days ago by queuep

Haven't been using react because of the JSX, but is this really where we are heading? https://hyperapp.dev/tutorial#rendering-to-the-dom

Looks like som obfuscated JS-code..

3 days ago by pjmlp

If I ever need to render HTML from JavaScript, this is my solution, https://lit-html.polymer-project.org/ or tagged templates directly, although I rather prefer straight MVC separation, SSR/Angular/Vue style.

3 days ago by raziel2p

Mithril was doing this exact thing before React became big - it's what we're moving away from (with JSX), not where we're heading.

3 days ago by lhorie

I wouldn't necessarily say we're moving one way or another. React technically released before Mithril. It just so happens React became more popular and JSX is idiomatic in React. But hyperscript is usually compatible w/ JSX (in fact, in Mithril you can choose whether you want to use JSX or hyperscript)

Personally, I think indentation w/ hyperscript tends to look more natural for large sets of props, e.g.

    h('div', {
      id: 'hello',
      title: 'hello'
      onclick: () => {
    }, [
      // hi

    // vs

      onclick={() => {
With Mithril's variety of hyperscript in particular there are also some other neat features, such as the ability to pass css selectors as the first argument, e.g. `h('input[type=password].password')` or `const TailwindComponent = '.rounded-lg.md:w-56'; const element = <TailwindComponent />`.

3 days ago by keb_

Many projects still predominantly use Hyperscript with the option to use JSX (including Mithril and Hyperapp, and others like RE:DOM, snabbdom to name a few). Even React has an option to use it if you want to skip the JSX compile-step. So I wouldn't say we're necessarily moving away from it.

Personally, I prefer Hyperscript. It took maybe a day for me to get over its perceived ugliness and actually appreciate that it's plain, valid JavaScript.

3 days ago by pjmlp

Going back to PHP and ASP you mean.

3 days ago by jrwr

Hay! There is some power in being able to bang out a page with <h1>Hello <?php echo "World"; ?></h1>

3 days ago by marcosdumay

Text templates are the technology for web development. They are so much better than anything else that there's no comparison.

There are some bad templates implementation, and some good ones. The original PHP and ASP are bad. But that doesn't mean templates are bad.

3 days ago by lyjackal

*improving on PHP and ASP

3 days ago by mhd

With thing like GraphQL, I get a definite ColdFusion vibe, too.

3 days ago by tobr

> obfuscated

I’ve heard this reaction before when people see hyperscript-like APIs. I don’t understand it. Isn’t it abundantly clear what is going on if you know DOM and JS? What is your suggestion if you don’t like hyperscript and don’t like JSX? Parsing string templates at run-time?

3 days ago by deergomoo

Wasn't the unwieldiness of render functions the entire reason JSX was created?

3 days ago by michaelcampbell

Not sure of the reason, but it's a godsend comparatively. The reaction against JSX I find to be largely by people who've never actually used it.

If you keep your components small, as is best practice, whatever gut reaction one feels to it (which IMO is misplaced to begin with) is minimized, and quite readable.

3 days ago by onetom

If you keep your components small, then using this `h` function instead of JSX doesn't make a lot of difference from readability perspective.

Also, don't forget that `h` is just a function, so nothing prevents you from creating your convenience functions, which allow more concise/readable code, eg:

const div = (...args) => h("div", ...args) const span = (...args) => h("span", ...args)

(or something along those lines)

I've experimented with this approach before (in ClojureScript) and you can get pretty far with it:


In fact the Hoplon (https://hoplon.io/) framework as already doing this many years ago, even just using the DOM directly.

3 days ago by gnud

My big issue with JSX is that it forces you to use a pre-processor and source maps.

If you have to do that anyway, I think I could use JSX instead of "pure" JS.

3 days ago by onetom

ah, and the article also mentioned https://github.com/developit/htm which pretty much provides what JSX does, just in a lot less complex way (at the cost of a little run-time)

3 days ago by undefined

Daily Digest

Get a daily email with the the top stories from Hacker News. No spam, unsubscribe at any time.