{"id":31914846,"url":"https://github.com/meinstein/dom-dope","last_synced_at":"2026-05-15T13:01:55.484Z","repository":{"id":57214931,"uuid":"166759138","full_name":"meinstein/dom-dope","owner":"meinstein","description":"A dope JavaScript library for building user interfaces.","archived":false,"fork":false,"pushed_at":"2019-01-30T06:15:37.000Z","size":272,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-22T05:33:54.339Z","etag":null,"topics":["dope","frontend","javascript","library","ui"],"latest_commit_sha":null,"homepage":null,"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/meinstein.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}},"created_at":"2019-01-21T06:21:34.000Z","updated_at":"2021-09-06T16:09:15.000Z","dependencies_parsed_at":"2022-09-12T11:12:40.604Z","dependency_job_id":null,"html_url":"https://github.com/meinstein/dom-dope","commit_stats":null,"previous_names":["meinstein/domdope"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/meinstein/dom-dope","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meinstein%2Fdom-dope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meinstein%2Fdom-dope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meinstein%2Fdom-dope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meinstein%2Fdom-dope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meinstein","download_url":"https://codeload.github.com/meinstein/dom-dope/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meinstein%2Fdom-dope/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33067476,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["dope","frontend","javascript","library","ui"],"created_at":"2025-10-13T19:42:08.433Z","updated_at":"2026-05-15T13:01:55.454Z","avatar_url":"https://github.com/meinstein.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **DomDope**\n\nA dope JavaScript library for creating user interfaces.\n\n## **Introduction**\n\nDomDope gives every component in your tree a bit of dope so that you can more easily build user interfaces.\n\n## **Getting Started**\n\n```html\n\u003cscript type=\"module\"\u003e\n  // No need for bundlers!\n  import DomDope from 'https://unpkg.com/domdope'\n  // The Root component\n  const RootComponent = dope =\u003e dope.make('div')\n  // The root element where everything gets mounted.\n  const rootElement = document.getElementById('root')\n  // Instantiate DomDope with above roots.\n  const dope = new DomDope(RootComponent, rootElement)\n  // Give the component tree the dope it needs.\n  dope.render()\n\u003c/script\u003e\n```\n\n## **Interface**\n\n```js\n// Use dope to make component.\nconst Component = dope =\u003e {\n  return dope.make('p', {\n    text: 'This is dope!'\n  })\n}\n```\n\n```js\n// Use dope to fetch data.\nconst Component = dope =\u003e {\n  dope.initialState = { data: null }\n\n  dope.onMount(async () =\u003e {\n    const response = await fetch('../data/is/dope')\n    const data = await response.json()\n    dope.state = { data }\n  })\n\n  if (!dope.state.data) {\n    return dope.make(null)\n  }\n\n  return dope.make('pre', {\n    text: JSON.stringfy(dope.state.data)\n  })\n}\n```\n\n```js\n// Use withProps to inject props into components.\nimport { withProps } from 'https://unpkg.com/domdope'\n\nconst Content = (dope, props) =\u003e {\n  return dope.make('div', { text: props.msg })\n}\n\nconst Nav = dope =\u003e {\n  const ContentWithProps = withProps(Content, { msg: '😎' })\n\n  return dope.make('nav', {\n    children: [ContentWithProps]\n  })\n}\n```\n\n```js\n// Use withRouter to inject routing-related props into components.\nimport { withRouter } from 'https://unpkg.com/domdope'\n\n// Use dope as a router.\nconst Component = (dope, props) =\u003e {\n  if (props.router.pathname !== '/') {\n    props.router.redirectTo('/')\n  }\n\n  return dope.make('a', {\n    text: 'Link to nowhere.',\n    onClick: () =\u003e props.router.goTo('/nowhere')\n  })\n}\n\nexport default withRouter(Component)\n```\n\n## **Demo**\n\nRun a simple HTTP server from this project's root folder:\n\n```\npython -m SimpleHTTPServer 8080\n```\n\nAnd go to `localhost:8080/demo`\n\n## **Examples**\n\n- https://github.com/meinstein/blog\n- https://github.com/meinstein/turn-me-on-lamps\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeinstein%2Fdom-dope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeinstein%2Fdom-dope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeinstein%2Fdom-dope/lists"}