{"id":20255080,"url":"https://github.com/hjfitz/vdom","last_synced_at":"2026-05-07T13:39:40.204Z","repository":{"id":75400866,"uuid":"325340994","full_name":"hjfitz/vdom","owner":"hjfitz","description":"Basic virtual dom with state and props","archived":false,"fork":false,"pushed_at":"2023-06-21T07:47:05.000Z","size":116,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-03T17:25:24.484Z","etag":null,"topics":["preact","react","state","vdom","virtual-dom"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hjfitz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2020-12-29T16:56:47.000Z","updated_at":"2023-07-08T21:22:53.000Z","dependencies_parsed_at":"2024-11-14T10:46:29.410Z","dependency_job_id":null,"html_url":"https://github.com/hjfitz/vdom","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hjfitz/vdom","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hjfitz%2Fvdom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hjfitz%2Fvdom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hjfitz%2Fvdom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hjfitz%2Fvdom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hjfitz","download_url":"https://codeload.github.com/hjfitz/vdom/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hjfitz%2Fvdom/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265086040,"owners_count":23709257,"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":["preact","react","state","vdom","virtual-dom"],"created_at":"2024-11-14T10:36:06.843Z","updated_at":"2026-05-07T13:39:40.159Z","avatar_url":"https://github.com/hjfitz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vdom\n\nI wanted to see if I could write my own react, to understand the framework. I did just that.\n\nThis is a highly un-tested, highly experimental dom-hybrid react-esque framework. \n\n## Usage\n\nIf you actually did want to play with this framework, it works as follows:\n\n**Create and render an element**\n\n```jsx\n// yes, this needs a better name\nimport {render, h} from 'hareact'\n\n// this should theoretically be friendly with jsx\nconst para = h('p', { class: 'bg-red' }, 'hello, world')\nconst body = h('main', {}, h(para))\n\ndocument.addEventListener('DOMContentLoaded', () =\u003e {\n  const entryPoint = document.getElementById('entry')\n  render(h(body), entryPoint)\n}\n```\n\n\n**Use stateful elements**\n\n```jsx\nimport {h} from 'hareact'\n\n// we get 3 'hooks'. Two for managing state and one for mounting\nexport const clock = (_, {setState, state, onMount}) =\u003e {\n  onMount(() =\u003e {\n    setInterval(() =\u003e setState(new Date()), 1e3)\n  })\n\n  return h('p', {}, 'The time is: ' state)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhjfitz%2Fvdom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhjfitz%2Fvdom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhjfitz%2Fvdom/lists"}