{"id":19025692,"url":"https://github.com/seanchas116/decompose","last_synced_at":"2026-04-30T09:30:17.223Z","repository":{"id":23595049,"uuid":"26963706","full_name":"seanchas116/decompose","owner":"seanchas116","description":"A simple component system built on top of virtual-dom","archived":false,"fork":false,"pushed_at":"2014-12-07T09:10:05.000Z","size":344,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-02T02:20:28.577Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","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/seanchas116.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":"2014-11-21T14:45:14.000Z","updated_at":"2015-04-14T03:13:18.000Z","dependencies_parsed_at":"2022-08-19T08:32:16.057Z","dependency_job_id":null,"html_url":"https://github.com/seanchas116/decompose","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanchas116%2Fdecompose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanchas116%2Fdecompose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanchas116%2Fdecompose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanchas116%2Fdecompose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seanchas116","download_url":"https://codeload.github.com/seanchas116/decompose/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240072131,"owners_count":19743526,"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":[],"created_at":"2024-11-08T20:44:21.794Z","updated_at":"2026-04-30T09:30:17.192Z","avatar_url":"https://github.com/seanchas116.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"decompose\n=========\n\n[![Build Status](https://travis-ci.org/seanchas116/decompose.svg)](https://travis-ci.org/seanchas116/decompose)\n\ndecompose is a library that provides a simple component system on [virtual-dom](https://github.com/Matt-Esch/virtual-dom/)\n\n### Features\n\n* Class-based component system like React\n  * Override `#render` to define view\n\n* Creates and diffs virtual DOM tree and apply patches to a real DOM locally in each component\n  * Using virtual-dom's \"Widget\" node\n\n* Supports mixing real DOM based components\n\nExample\n--------\n\n```coffeescript\nclass TodoCollection extends EventEmitter\n\n  constructor: (@todos) -\u003e\n\n  add: (todo) -\u003e\n    @todos.push(todo)\n    @emit 'update'\n\nclass TodoView extends Component\n\n  render: -\u003e\n    h 'li', [\n      h 'h2', @todo.title\n    ]\n\nclass TodoListView extends Component\n\n  render: -\u003e\n    h 'ul', @todos.map (todo) =\u003e\n      TodoView.render todo: todo\n\ntodoCollection = new TodoCollection [\n  { title: 'Go to town' }\n  { title: 'Buy some food' }\n]\n\ntodoListView = new TodoListView(todos: todoCollection.todos)\ntodoCollection.on 'update', -\u003e\n  todoListView.update()\n\nwindow.addEventListener 'load', -\u003e\n  new Mount(todoListView).mount(document.getElementById('main'))\n  setInterval (-\u003e todoCollection.add {title: 'New task'}), 1000\n```\nTodo\n--------\n\n* More tests\n* Better support for ES5\n* Release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseanchas116%2Fdecompose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseanchas116%2Fdecompose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseanchas116%2Fdecompose/lists"}