TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Hyperapp – A tiny framework for building web interfaces

397 点作者 Al0neStar将近 5 年前

31 条评论

PufPufPuf将近 5 年前
I have tried Hyperapp some time ago. It&#x27;s usable for small apps, but the lack of ecosystem makes it unfit for anything larger -- as is usual for all niché JS frameworks.<p>Funnily, the &quot;ecosystem&quot; page contains just Lorem Ipsum (<a href="https:&#x2F;&#x2F;hyperapp.dev&#x2F;ecosystem" rel="nofollow">https:&#x2F;&#x2F;hyperapp.dev&#x2F;ecosystem</a>) and the Awesome Hyperapp section for V2 is almost empty (<a href="https:&#x2F;&#x2F;github.com&#x2F;jorgebucaran&#x2F;awesome-hyperapp" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jorgebucaran&#x2F;awesome-hyperapp</a>)
评论 #23689479 未加载
评论 #23691987 未加载
评论 #23689153 未加载
评论 #23693428 未加载
评论 #23690546 未加载
评论 #23696093 未加载
mr0010110fixit将近 5 年前
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.<p>These are medium&#x2F;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.<p>Hyperapp can and will work, with larger applications, but hyperapp does not have super strict &quot;guide rails&quot; 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.<p>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.
评论 #23692572 未加载
评论 #23737079 未加载
mrozbarry将近 5 年前
Bit of a Hyperapp fanboy here, so bare with me.<p>First, I think Hyperapp can make both small and big applications, opposed to u&#x2F;PufPufPuf&#x27;s opinion. A lot of people have this opinion because they are more familiar with v1&#x27;s wired-in actions, which can become quite unruly. In the latest version, actions are decoupled, and can be organized&#x2F;extracted however you see fit.<p>I&#x27;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:<p>- A timer for mob programming: <a href="https:&#x2F;&#x2F;github.com&#x2F;mrozbarry&#x2F;mobtime" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mrozbarry&#x2F;mobtime</a><p>- A canvas game, using Hyperapp for dom&#x2F;state: <a href="https:&#x2F;&#x2F;github.com&#x2F;mrozbarry&#x2F;smash" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mrozbarry&#x2F;smash</a><p>- A router for Hyperapp: <a href="https:&#x2F;&#x2F;github.com&#x2F;mrozbarry&#x2F;hyperapp-router" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mrozbarry&#x2F;hyperapp-router</a><p>I have a handful of older youtube videos regarding v1, you can check them out here:<p>- Intro to Hyperapp (v1): <a href="https:&#x2F;&#x2F;youtu.be&#x2F;uWIyjI8nkz0" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;uWIyjI8nkz0</a><p>- Hyperapp (v1) forms and localstorage: <a href="https:&#x2F;&#x2F;youtu.be&#x2F;qpt6aaMxm1E" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;qpt6aaMxm1E</a><p>- Unit testing hyperapps (v1): <a href="https:&#x2F;&#x2F;youtu.be&#x2F;5wvPUj--HaA" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;5wvPUj--HaA</a><p>Note, they are outdated, but there isn&#x27;t much on youtube about Hyperapp in general.<p>One thing to keep in mind is the naming. A lot of people talk about &quot;Hyperapp&quot; as the first version, and &quot;v2&quot; as the current version, but this is wrong. It&#x27;s more like &quot;v1&quot; (legacy) and &quot;Hyperapp&quot; (current). It gets confusing, because not everyone is on the same page with that, but this the the naming Jorge (primary author&#x2F;creator of Hyperapp) has mentioned several times.
评论 #23694508 未加载
评论 #23692809 未加载
评论 #23696501 未加载
beders将近 5 年前
Someone got inspired by re-frame, I see :) I like the approach. Wondering if there&#x27;s a way to get ever closer to hiccup (without having to resort to JSX)<p>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.<p>i.e. [h1, {}, [MyComponent, {}]]<p>vs.<p>h(&quot;h1&quot;, {}, MyComponent({}))<p>If the framework figures out that MyComponent wasn&#x27;t changed, it can re-use the VDOM nodes.
评论 #23692792 未加载
Shish2k将近 5 年前
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”).<p>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...)<p>As an example of how trivial problems require trivial code:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;shish&#x2F;divetools2&#x2F;blob&#x2F;master&#x2F;src&#x2F;screens&#x2F;mod.tsx" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;shish&#x2F;divetools2&#x2F;blob&#x2F;master&#x2F;src&#x2F;screens&#x2F;...</a><p><a href="https:&#x2F;&#x2F;scuba.shish.io&#x2F;#screen=MaxOperatingDepth" rel="nofollow">https:&#x2F;&#x2F;scuba.shish.io&#x2F;#screen=MaxOperatingDepth</a>
ptu将近 5 年前
I&#x27;m a big re-frame fan from the Clojurescript world so this all looks rather familiar. For me it&#x27;s a great framework and worth learning Clojurescript for.<p>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&#x27;s a joy. But it looks nicer than JSX.<p>I&#x27;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&#x27;re going off-piste enough to avoid the React&#x2F;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&#x27;s possible to do pretty much anything you want. And whilst the type system and compiler of Elm is nice, the slightly more &#x27;infamous&#x27; parts of restrictions to JS extensions make it more limited in the real world.
queuep将近 5 年前
Haven&#x27;t been using react because of the JSX, but is this really where we are heading? <a href="https:&#x2F;&#x2F;hyperapp.dev&#x2F;tutorial#rendering-to-the-dom" rel="nofollow">https:&#x2F;&#x2F;hyperapp.dev&#x2F;tutorial#rendering-to-the-dom</a><p>Looks like som obfuscated JS-code..
评论 #23689423 未加载
评论 #23689417 未加载
评论 #23691613 未加载
评论 #23689306 未加载
评论 #23693716 未加载
评论 #23691090 未加载
评论 #23689329 未加载
评论 #23690852 未加载
评论 #23689794 未加载
评论 #23694087 未加载
dang将近 5 年前
If curious see also<p>2018 <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17126670" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17126670</a><p>2017 <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15467819" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15467819</a><p>2017 <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15264053" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15264053</a><p>2017 <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15178535" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15178535</a><p>2017 <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=14629414" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=14629414</a>
bshimmin将近 5 年前
In the tutorial it says: &quot;In this tutorial we&#x27;ll stick with `h` to keep it simple and close to the metal.&quot; I&#x27;m pretty sure they put that in there just to aggravate the HN crowd.
评论 #23690161 未加载
评论 #23691982 未加载
评论 #23689677 未加载
评论 #23689586 未加载
评论 #23689963 未加载
davydog187将近 5 年前
Just use <a href="https:&#x2F;&#x2F;preactjs.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;preactjs.com&#x2F;</a> and call it a day
评论 #23690966 未加载
评论 #23689214 未加载
评论 #23689939 未加载
评论 #23689220 未加载
czechdeveloper将近 5 年前
I love it, but I actually stuck with version 1, which was way more intuitive for me.<p>Just a side note, I&#x27;m not fulltime front-end, so keeping up with modern frameworks is out of my capacity.<p>It&#x27;s great for smart components to my standard multi-paged systems, but I used it even for small PWA applications.
评论 #23689292 未加载
评论 #23690106 未加载
bharani_m将近 5 年前
I&#x27;ve used this for building the browser extensions for my app [1].<p>It is simple, easy to understand and easy to reason with. However, I would recommend this only for small apps. As soon as your app&#x27;s features&#x2F;complexity increases, you end up writing a lot of biolerplate code that libraries like Vue or Preact already handle you for.<p>[1] <a href="https:&#x2F;&#x2F;www.emailthis.me" rel="nofollow">https:&#x2F;&#x2F;www.emailthis.me</a>
评论 #23689610 未加载
评论 #23690134 未加载
评论 #23689284 未加载
pgt将近 5 年前
To me every JavaScript framework feels to me like it wants to reason about components as data, ala Hiccup: <a href="https:&#x2F;&#x2F;reagent-project.github.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;reagent-project.github.io&#x2F;</a>
评论 #23692552 未加载
wackget将近 5 年前
Does modern web development just completely abandon the idea of &quot;separation of concerns&quot;? Looks like content is freely mixed with markup and logic and results in a horrible, difficult-to-read mess of code.
评论 #23692345 未加载
评论 #23692421 未加载
评论 #23692226 未加载
评论 #23692370 未加载
Glaeqen将近 5 年前
It seems that scrolling is somewhat broken. Scroll position under one route affects position in others.
评论 #23689295 未加载
manx将近 5 年前
How is it 2x faster than react? Where does this claim come from?
评论 #23689103 未加载
评论 #23692671 未加载
评论 #23689121 未加载
评论 #23693273 未加载
评论 #23689075 未加载
ancarda将近 5 年前
Just shows a blank page without JavaScript. Does Hyperapp have any way to render out an HTML fallback if JS doesn&#x27;t load?
评论 #23690072 未加载
shroom将近 5 年前
Dang, I registered hyperapp domain because I thought it was a good name and wanted to build something cool there. Like all side projects it’s not about the idea but the execution. I’ll put this in my bin together with slackday (Should have registered slack:)<p>On topic: This looks interesting and I Will be giving it a try. Well done!
评论 #23692190 未加载
nailer将近 5 年前
React was made in 2013 and is pretty old at this point. How does Hyperapp compare to current tech like Svelte?
评论 #23692347 未加载
评论 #23691881 未加载
schwartzworld将近 5 年前
When last I checked, Hyperapp was basically the elm architecture implemented in JS, a gateway drug.
评论 #23689234 未加载
recursive将近 5 年前
I wish people would stop demonstrating new languages or frameworks using fonts with ligatures.<p>&quot;Surely, you couldn&#x27;t use an actual arrow here... right?&quot;<p>I find myself having to copy and paste the text to find out for sure.
wooolfgang将近 5 年前
Love the website aesthetic!
ehutch79将近 5 年前
This page does not inspire confidence in the framework.<p>I don&#x27;t need a non-ui piece of software to have the slickest site... but no lorem ipsum please.
评论 #23692238 未加载
loustak将近 5 年前
What are the difference with Mithril.js? Both seems to embrace the same philosophy in almost the same way. Or am I missing something?
评论 #23692479 未加载
oweiler将近 5 年前
I love hyperapp! It has very few concepts to learn, and the source code is less than 500 lines. Sadly its ecosystem is non-existant.
RyanGoosling将近 5 年前
Just another transient DOM API abstraction library
评论 #23701544 未加载
评论 #23703524 未加载
jhardy54将近 5 年前
Blank page when JS is disabled. :&#x2F;
joelbluminator将近 5 年前
How does this compare to Stimulus?
评论 #23692536 未加载
aabbcc1241将近 5 年前
Now it looks like Elm
评论 #23690634 未加载
Nijikokun将近 5 年前
Looks like mithril
jczhang将近 5 年前
so.. a lighter react?
评论 #23703408 未加载