{"id":13394338,"url":"https://github.com/jorgebucaran/hyperapp","last_synced_at":"2025-05-12T16:24:06.758Z","repository":{"id":33040237,"uuid":"79527893","full_name":"jorgebucaran/hyperapp","owner":"jorgebucaran","description":"1kB-ish JavaScript framework for building hypertext applications","archived":false,"fork":false,"pushed_at":"2025-03-20T01:04:38.000Z","size":6946,"stargazers_count":19128,"open_issues_count":12,"forks_count":781,"subscribers_count":306,"default_branch":"main","last_synced_at":"2025-05-12T16:23:57.020Z","etag":null,"topics":["framework","javascript","vdom","web"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jorgebucaran.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-01-20T05:20:21.000Z","updated_at":"2025-05-12T15:54:31.000Z","dependencies_parsed_at":"2025-04-22T13:42:27.574Z","dependency_job_id":"c806c6eb-f111-4a1d-b19a-194fde0aae4b","html_url":"https://github.com/jorgebucaran/hyperapp","commit_stats":{"total_commits":1310,"total_committers":111,"mean_commits":"11.801801801801801","dds":"0.19694656488549622","last_synced_commit":"c3717e3ff78b6fa8663575d34d330d68929a0974"},"previous_names":["foldmap/hyperapp","jorgebucaran/hyperapp","srcfile/hyperapp","joxji/hyperapp","hyperapp/hyperapp"],"tags_count":155,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorgebucaran%2Fhyperapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorgebucaran%2Fhyperapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorgebucaran%2Fhyperapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorgebucaran%2Fhyperapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jorgebucaran","download_url":"https://codeload.github.com/jorgebucaran/hyperapp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253774690,"owners_count":21962216,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["framework","javascript","vdom","web"],"created_at":"2024-07-30T17:01:16.400Z","updated_at":"2025-05-12T16:24:06.708Z","avatar_url":"https://github.com/jorgebucaran.png","language":"JavaScript","funding_links":["https://github.com/sponsors/jorgebucaran"],"categories":["JavaScript","Uncategorized","前端相关","framework","前端开发框架及项目",":clap: 欢迎参与​","目录","web","Frameworks","javascript","Integrations","Inspired by Elm","Official Resources","UI Frameworks","📦 Legacy \u0026 Inactive Projects"],"sub_categories":["Uncategorized","其他_文本生成、文本对话","js框架","MVVC","JSX supported libraries other than react","Games"],"readme":"# Hyperapp\n\n\u003e The tiny framework for building hypertext applications.\n\n- **Do more with less**—We have minimized the concepts you need to learn to get stuff done. Views, actions, effects, and subscriptions are all pretty easy to get to grips with and work together seamlessly.\n- **Write what, not how**—With a declarative API that's easy to read and fun to write, Hyperapp is the best way to build purely functional, feature-rich, browser-based apps using idiomatic JavaScript.\n- **Smaller than a favicon**—1 kB, give or take. Hyperapp is an ultra-lightweight Virtual DOM, [highly-optimized diff algorithm](https://javascript.plainenglish.io/javascript-frameworks-performance-comparison-2020-cd881ac21fce), and state management library obsessed with minimalism.\n\nHere's the first example to get you started. [Try it here](https://codepen.io/jorgebucaran/pen/zNxZLP?editors=1000)—no build step required!\n\n\u003c!-- prettier-ignore --\u003e\n```html\n\u003cscript type=\"module\"\u003e\n  import { h, text, app } from \"https://unpkg.com/hyperapp\"\n\n  const AddTodo = (state) =\u003e ({\n    ...state,\n    value: \"\",\n    todos: state.todos.concat(state.value),\n  })\n\n  const NewValue = (state, event) =\u003e ({\n    ...state,\n    value: event.target.value,\n  })\n\n  app({\n    init: { todos: [], value: \"\" },\n    view: ({ todos, value }) =\u003e\n      h(\"main\", {}, [\n        h(\"h1\", {}, text(\"To do list\")),\n        h(\"input\", { type: \"text\", oninput: NewValue, value }),\n        h(\"ul\", {},\n          todos.map((todo) =\u003e h(\"li\", {}, text(todo)))\n        ),\n        h(\"button\", { onclick: AddTodo }, text(\"New!\")),\n      ]),\n    node: document.getElementById(\"app\"),\n  })\n\u003c/script\u003e\n\n\u003cmain id=\"app\"\u003e\u003c/main\u003e\n```\n\n[Check out more examples](https://codepen.io/collection/nLLvrz?grid_type=grid)\n\nThe app starts by setting the initial state and rendering the view on the page. User input flows into actions, whose function is to update the state, causing Hyperapp to re-render the view.\n\nWhen describing how a page looks in Hyperapp, we don't write markup. Instead, we use `h()` and `text()` to create a lightweight representation of the DOM (or virtual DOM for short), and Hyperapp takes care of updating the real DOM efficiently.\n\n## Installation\n\n```console\nnpm install hyperapp\n```\n\n## Documentation\n\nLearn the basics in the [Tutorial](docs/tutorial.md), check out the [Examples](https://codepen.io/collection/nLLvrz?grid_type=grid), or visit the [Reference](docs/reference.md).\n\n## Packages\n\nOfficial packages provide access to [Web Platform](https://platform.html5.org) APIs in a way that makes sense for Hyperapp. For third-party packages and real-world examples, browse the [Hyperawesome](https://github.com/jorgebucaran/hyperawesome) collection.\n\n| Package                                        | Status                                                                                                                                              | About                                                                                                     |\n| ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |\n| [`@hyperapp/dom`](/packages/dom)               | [![npm](https://img.shields.io/npm/v/@hyperapp/dom.svg?style=for-the-badge\u0026color=0366d6\u0026label=)](https://www.npmjs.com/package/@hyperapp/dom)       | Inspect the DOM, focus and blur.                                                                          |\n| [`@hyperapp/svg`](/packages/svg)               | [![npm](https://img.shields.io/npm/v/@hyperapp/svg.svg?style=for-the-badge\u0026color=0366d6\u0026label=)](https://www.npmjs.com/package/@hyperapp/svg)       | Draw SVG with plain functions.                                                                            |\n| [`@hyperapp/html`](/packages/html)             | [![npm](https://img.shields.io/npm/v/@hyperapp/html.svg?style=for-the-badge\u0026color=0366d6\u0026label=)](https://www.npmjs.com/package/@hyperapp/html)     | Write HTML with plain functions.                                                                          |\n| [`@hyperapp/time`](/packages/time)             | [![npm](https://img.shields.io/npm/v/@hyperapp/time.svg?style=for-the-badge\u0026color=0366d6\u0026label=)](https://www.npmjs.com/package/@hyperapp/time)     | Subscribe to intervals, get the time now.                                                                 |\n| [`@hyperapp/events`](/packages/events)         | [![npm](https://img.shields.io/npm/v/@hyperapp/events.svg?style=for-the-badge\u0026color=0366d6\u0026label=)](https://www.npmjs.com/package/@hyperapp/events) | Subscribe to mouse, keyboard, window, and frame events.                                                   |\n| [`@hyperapp/http`](/packages/http)             | [![npm](https://img.shields.io/badge/-planned-6a737d?style=for-the-badge\u0026label=)](https://www.npmjs.com/package/@hyperapp/http)                     | Talk to servers, make HTTP requests ([#1027](https://github.com/jorgebucaran/hyperapp/discussions/1027)). |\n| [`@hyperapp/random`](/packages/random)         | [![npm](https://img.shields.io/badge/-planned-6a737d?style=for-the-badge\u0026label=)](https://www.npmjs.com/package/@hyperapp/random)                   | Declarative random numbers and values.                                                                    |\n| [`@hyperapp/navigation`](/packages/navigation) | [![npm](https://img.shields.io/badge/-planned-6a737d?style=for-the-badge\u0026label=)](https://www.npmjs.com/package/@hyperapp/navigation)               | Subscribe and manage the browser URL history.                                                             |\n\n\u003e Need to create your own effects and subscriptions? [You can do that too](docs/reference.md).\n\n## Help, I'm stuck!\n\nIf you've hit a stumbling block, hop on our [Discord](https://discord.gg/eFvZXzXF9U) server to get help, and if you remain stuck, [please file an issue](https://github.com/jorgebucaran/hyperapp/issues/new), and we'll help you figure it out.\n\n## Contributing\n\nHyperapp is free and open-source software. If you want to support Hyperapp, becoming a contributor or [sponsoring](https://github.com/sponsors/jorgebucaran) is the best way to give back. Thank you to everyone who already contributed to Hyperapp! \u003c3\n\n[![](https://opencollective.com/hyperapp/contributors.svg?width=1024\u0026button=false)](https://github.com/jorgebucaran/hyperapp/graphs/contributors)\n\n## License\n\n[MIT](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjorgebucaran%2Fhyperapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjorgebucaran%2Fhyperapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjorgebucaran%2Fhyperapp/lists"}