Skip to main content
XenonStack

Service Design

XenonStack Insights What Is Hyperapp? Architecture, Tools and When to Use

and | Published | Updated

What Is Hyperapp? Architecture, Tools and When to Use
8:51
What Is Hyperapp: a stack from state and view function up to effects, subscriptions and a small, testable user interface

Key takeaway

  • Hyperapp is a tiny JavaScript framework for web UIs. See how state, actions, effects and subscriptions work, its tools, version 2.0.22 and when to use it.

Hyperapp is a tiny JavaScript framework for building web user interfaces. According to its GitHub page, it is "the tiny framework for building hypertext applications", about 1 kB "give or take", released under the MIT licence. You describe the page as a function of your state, and Hyperapp updates the DOM when the state changes.

For enterprise teams the useful question is where it fits. Hyperapp suits small widgets, internal tools and embedded interfaces where bundle size and simplicity matter. For large, long-lived applications with many contributors, most teams still pick a framework with a bigger ecosystem. Our guides to data visualisation libraries in JavaScript and functional programming in JavaScript cover the wider landscape.

What is Hyperapp?

Hyperapp is an open-source front-end library. Its readme says views, actions, effects and subscriptions are "all pretty easy to get to grips with". The current package on npm is version 2.0.22 (read on the npm registry, 13 November 2026; confirm the latest version on npm before you install).

Hyperapp does not require Node.js, JSX or a bundler to get started. The readme's first example imports the library straight from a CDN inside a browser module script and states "no build step required". You can still install it with npm install hyperapp and use a bundler when your project needs one.

QuestionAnswerSource
What is it?A tiny framework for hypertext applicationsHyperapp GitHub readme
How big is it?About 1 kB, give or takeHyperapp GitHub readme
LicenceMITHyperapp GitHub and npm registry
Current npm version2.0.22npm registry, 13 November 2026
Build step needed?No, it can load from a CDNHyperapp GitHub readme

How does Hyperapp work?

A Hyperapp program has three parts: state, a view and actions. The state holds the data. The view is a function that takes the state and returns a virtual DOM tree. Actions are functions that take the current state, and an optional payload, and return a new state. When the state changes, Hyperapp redraws the view.

Two-column diagram: user event, action, effect and subscription on the left; state, view, redraw and a small testable interface on the right.

How do you start an app?

You call app() with one object. According to the Hyperapp tutorial, its main properties are init (the starting state), view (a function from state to virtual DOM), node (the DOM element to render into) and subscriptions (a function that returns the active subscriptions). Views are built with h() for elements and text() for text nodes.

Here is a minimal counter written against that documented API. Treat it as an illustration and check it against the current docs before using it.

import { h, text, app } from "https://unpkg.com/hyperapp"

app({
  init: 0,
  view: (count) =>
    h("main", {}, [
      h("h1", {}, text(count)),
      h("button", { onclick: (count) => count - 1 }, text("-")),
      h("button", { onclick: (count) => count + 1 }, text("+")),
    ]),
  node: document.getElementById("app"),
})

Many older tutorials online pass state, actions and view as separate arguments and need JSX and Babel. The tutorial and readme on GitHub use the single options object shown above, so check which version a tutorial targets before copying its code.

What are effects and subscriptions?

Actions stay pure: they return a new state. Side effects such as a network request go through effects. According to the tutorial, an effect is a pair of a function and its options; the function receives dispatch and calls an action with the result. An action can return [newState, effect] to update the state and start the effect.

Subscriptions listen to outside events, such as key presses or timers. A subscription starts when the state calls for it and returns a clean-up function that stops it. The readme lists official packages for common needs: @hyperapp/dom, @hyperapp/svg, @hyperapp/html, @hyperapp/time and @hyperapp/events, with @hyperapp/http, @hyperapp/random and @hyperapp/navigation marked as planned.

What tools do you need for Hyperapp?

ToolNeeded?When it helps
A browser with module scriptsYesRun the app directly from a CDN import
npmOptionalInstall hyperapp as a dependency
A bundlerOptionalCombine and minify files for production
JSX transformOptionalOnly if your team prefers JSX over h() calls
Official add-on packagesOptionalEvents, time, DOM and SVG helpers

The readme does not state minimum Node.js or browser versions, so confirm browser support on the project page for your audience.

What are the benefits of Hyperapp?

  • Small footprint. The readme describes it as about 1 kB, which keeps pages light.
  • Built-in state handling. State, actions and views are part of the library, so there is no separate state library to add.
  • Few concepts. Views, actions, effects and subscriptions are the whole model, which makes onboarding quick.
  • Easy to test. Views and actions are plain functions, so they can be tested without a browser.
  • No mandatory build step. You can prototype from a single HTML file.

When should you not choose Hyperapp?

SituationFits Hyperapp?Reason
Small widget or internal toolYesTiny footprint, few concepts
Prototype or demo pageYesNo build step is needed
Large application with many teamsReview firstSmaller ecosystem than the mainstream frameworks
Need for ready-made component librariesReview firstCheck that the components you need exist
Strict long-term vendor supportReview firstIt is a community project; check release activity on npm and GitHub

This is a judgement, not a benchmark. Review the project's activity and the size of your team before you commit, and pair it with good code structure, as described in our guide to SOLID principles in JavaScript and TypeScript and design patterns in TypeScript and JavaScript.

How do you govern small front ends in an enterprise?

Small front ends often sit in front of AI agents and data services, for example a status panel or an approval form. Whichever framework you use, the interface should not decide policy. ElixirData Context OS keeps governed context, versioned policy and decision traces in one decision layer above AI agents, and ElixirClaw is an agentic OS platform to build, orchestrate and govern AI agents and automation workflows while keeping humans in control.

To map one user-interface decision your agents should make, and the context and policy it depends on, book a Context Workshop. See what happens in the workshop.

Frequently asked questions about Hyperapp

What is Hyperapp used for?

It is used to build web user interfaces from state, actions and views. According to its GitHub page it is a tiny framework of about 1 kB.

Is Hyperapp free?

Yes. It is released under the MIT licence, as shown on its GitHub page and the npm registry.

Does Hyperapp need a build step or JSX?

No. The readme's first example loads Hyperapp from a CDN and says no build step is required. JSX is optional.

What is the current version of Hyperapp?

The npm registry listed 2.0.22 as the latest version on 13 November 2026. Confirm the current version on npm before installing.

How does Hyperapp handle side effects?

Through effects, which receive a dispatch function, and subscriptions, which listen to outside events and return a clean-up function, according to the project tutorial.

Related reading

Next Steps with Hyperapp Working

Talk to our experts about implementing compound AI system, How Industries and different departments use Agentic Workflows and Decision Intelligence to Become Decision Centric. Utilizes AI to automate and optimize IT support and operations, improving efficiency and responsiveness.

 

Table of Contents

navdeep-singh-gill

Navdeep Singh Gill

Global CEO and Founder of XenonStack

LinkedIn profile

Navdeep Singh Gill is serving as Chief Executive Officer and Product Architect at XenonStack. He holds expertise in building SaaS Platform for Decentralised Big Data management and Governance, AI Marketplace for Operationalising and Scaling. His incredible experience in AI Technologies and Big Data Engineering thrills him to write about different use cases and its approach to solutions.

Get the latest articles in your inbox

Subscribe Now

Interested in solving your challenges with the XenonStack team?
Get Started

Tell us about you and your priorities so we can prepare the right conversation. It takes about 2 minutes.

Please Select your Industry
Banking
Fintech
Payment Providers
Wealth Management
Discrete Manufacturing
Semiconductor
Machinery Manufacturing / Automation
Appliances / Electrical / Electronics
Elevator Manufacturing
Defense & Space Manufacturing
Computers & Electronics / Industrial Machinery
Motor Vehicle Manufacturing
Food and Beverages
Distillery & Wines
Beverages
Shipping
Logistics
Mobility (EV / Public Transport)
Energy & Utilities
Hospitality
Digital Gaming Platforms
SportsTech with AI
Public Safety - Explosives
Public Safety - Firefighting
Public Safety - Surveillance
Public Safety - Others
Media Platforms
City Operations
Airlines & Aviation
Defense Warfare & Drones
Robotics Engineering
Drones Manufacturing
AI Labs for Colleges
AI MSP / Quantum / AGI Institutes
Retail Apparel and Fashion

Continue