{"id":21763927,"url":"https://github.com/foxbunny/duckweed","last_synced_at":"2025-04-13T13:42:04.112Z","repository":{"id":57143616,"uuid":"102042424","full_name":"foxbunny/duckweed","owner":"foxbunny","description":"JavaScript microframework for programming reactive interfaces using Model-Action-View architecture","archived":false,"fork":false,"pushed_at":"2017-11-05T11:57:36.000Z","size":437,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T04:41:41.046Z","etag":null,"topics":["elm-architecture","framework-javascript","snabbdom","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/foxbunny.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-31T20:32:15.000Z","updated_at":"2020-09-02T15:34:08.000Z","dependencies_parsed_at":"2022-09-05T22:51:52.209Z","dependency_job_id":null,"html_url":"https://github.com/foxbunny/duckweed","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxbunny%2Fduckweed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxbunny%2Fduckweed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxbunny%2Fduckweed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxbunny%2Fduckweed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foxbunny","download_url":"https://codeload.github.com/foxbunny/duckweed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248724447,"owners_count":21151557,"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":["elm-architecture","framework-javascript","snabbdom","typescript"],"created_at":"2024-11-26T12:16:55.638Z","updated_at":"2025-04-13T13:42:04.093Z","avatar_url":"https://github.com/foxbunny.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Duckweed logo](./docs/media/duckweed-logo.svg)\n\n**Duckweed: JavaScript microframework for programming reactive interfaces using\nModel-Action-View architecture**\n\n![Travis build status](https://travis-ci.org/foxbunny/duckweed.svg?branch=master)\n![Coverage status](https://codecov.io/gh/foxbunny/duckweed/branch/master/graph/badge.svg)\n\nDuckweed is inspired by [Elm](http://elm-lang.org/) and [Simon Friis\nVindum's](https://github.com/paldepind) [Functional Frontend\nArchitecture](https://github.com/paldepind/functional-frontend-architecture).\nUnlike its sources of inspiration, though, Duckweed's primary goal is not to\npromote or enforce functional programming paradigm. It's main goal is to provide\na simple API, and functions happen to be a good step in that direction.\n\nDuckweed is written in [TypeScript](https://www.typescriptlang.org), and uses\n[Snabbdom](https://github.com/snabbdom/snabbdom) under the hood.\n\nAlthough Duckweed is small (only 7KB min+gz), it includes state management,\ntransitions, routing events, and the full power of Snabbdom.\n\n# Installation\n\nTo install Duckweed, use:\n\n```\nnpm install duckweed\n```\n\nCurrently, only beta releases are available.\n\n# Take it for a spin\n\nThis [fiddle](https://jsfiddle.net/foxbunny/e0pjybw7/) contains a small counter\nexample that you can fork and play with.\n\n# Demo app\n\nA more fully featured proof-of-concept application can be found [on\nGitHub](https://github.com/foxbunny/duckweed-tasks). You can see it in action\n[here](https://foxbunny.github.io/duckweed-tasks/).\n\n# Documentation\n\nDocumentation can be read [on\nGitHub](https://github.com/foxbunny/duckweed/tree/master/docs/main.md). It\nincludes a developer guide and the API reference.\n\n# I want class-based components!\n\nHere you go:\n\n```jsx\nclass HelloDuckweed {\n  constructor(initialState = {}) {\n    this.state = initialState;\n    this.update = this.update.bind(this);\n    this.render = this.render.bind(this);\n  }\n\n  update(_, address, ...args) {\n    return this[address](...args);\n  }\n\n  updateName(e) {\n    this.state.name = e.target.value;\n  }\n\n  render({act}) {\n    return (\n      \u003cdiv\u003e\n        \u003ch1\u003eHello {this.state.name || \"World\"}!\u003c/h1\u003e\n        \u003cinput type=\"text\" value={this.state.name} on-input={act(\"updateName\")} /\u003e\n      \u003c/div\u003e\n    );\n  }\n};\n\nconst comp = new HelloDuckweed();\n\nduckweed.runner(undefined, comp.update, comp.render);\n```\n\nNo, sorry, it was just a joke. I'm pretty sure it would work, but, to be honest,\nI designed Duckweed specifically to avoid using this pattern.\n\n# What's with the name?\n\n[Duckweed](https://en.wikipedia.org/wiki/Lemnoideae) is a water plant with\nsimple no-frills features, and one of the fastest growing plants on Earth. It\nhas been argued that a single duckweed could create a mass of duckweeds the size\nof the Earth in a single month. It is also an invaluable water purifier, and\nbeing studied as a potential source of clean energy. What I'm trying to say is,\nduckweed is pretty awesome.\n\n# Benchmarks\n\nIt's... erm... fast enough. :)\n\n# Under construction\n\nDuckweed is still in very very early stages of development. Don't expect it to\nbe production-ready. The API may also fluctuate between versions. The level of\nbreakage you can expect is predictable, though.\n\nDuckweed uses semantic versioning, so no major problems should be expected until\nthe next major version bump. Each time a major version is bumped, though, you\ncan be certain it's backwards-incompatible with the previous versions.\n\n# License\n\nDuckweed is licensed under the terms of the MIT license. See the `LICENSE` file\nfor more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxbunny%2Fduckweed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoxbunny%2Fduckweed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxbunny%2Fduckweed/lists"}