Live data from Hacker News

Hyperapp – A tiny framework for building web interfaces

hyperapp.dev

81–90 of 198 posts

Re: Hyperapp – A tiny framework for building web interfaces

#83
post #20

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

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.

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.

Re: Hyperapp – A tiny framework for building web interfaces

#84

Earlier quoted context omitted.

Missing a wildcard route? No idea how your routing is setup

It's all client-side. When I click that link, it opens the site as usual.

Click the link directly: https://hyperapp.dev/ecosystem

As the parent said, you don't have a catch-all route. That is why!

Re: Hyperapp – A tiny framework for building web interfaces

#85

Earlier quoted context omitted.

Do you know why?

Oooh, I see. It ( https://hyperapp.dev/ecosystem ) is broken if you've never been to https://hyperapp.dev before.

Ah, gotcha gotcha. Thank you for reporting it! :)

Re: Hyperapp – A tiny framework for building web interfaces

#86
post #20

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

Thank you! This is exactly the kind of feedback that we need to improve our presentation. I might just update the tutorial to use @hyperapp/html [1] instead.

[1]: https://www.npmjs.com/package/@hyperapp/html

Re: Hyperapp – A tiny framework for building web interfaces

#87
post #43

Earlier quoted context omitted.

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

The same is true of JSX. You can abstract and generalize its components with equal ease. I agree with another commenter that a lot of the common objections to JSX and React more generally, especially on HN, sound like things that people who've never used it but only seen a few examples would say. It's a shame, because with a little more experience those people could complain about stuff like how the complex form logi…

I personally never found much inherent value to JSX outside of making it easier to onboard other developers who are already familiar with HTML, or have seen React before. Otherwise, I found Hyperscript easy to read after about a day of using it, and there's no extra toolchain or compile-step required to use it. Plus it's "just JavaScript."

Re: Hyperapp – A tiny framework for building web interfaces

#88
post #20

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

Thank you! This is exactly the kind of feedback that we need to improve our presentation. I might just update the tutorial to use @hyperapp/html [1] instead. [1]: https://www.npmjs.com/package/@hyperapp/html

Please don't. Not everyone uses these additional libraries or preprocessors, and it was a big hurdle to figure out what was actually being generated behind the scenes in the v1 docs.

A good approach is to show us what we need to do with no other dependencies (i.e. just as you're doing now with this h() function), and link to alternative syntaxes/libraries that may be optionally used instead.

Re: Hyperapp – A tiny framework for building web interfaces

#89
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.

Post reply on HN