{"id":18095722,"url":"https://github.com/pearofducks/mount-vue-component","last_synced_at":"2025-07-29T20:35:05.980Z","repository":{"id":46188410,"uuid":"296930677","full_name":"pearofducks/mount-vue-component","owner":"pearofducks","description":"a tiny utility to programatically create and mount Vue 3 components (e.g. a Vue.extend replacement)","archived":false,"fork":false,"pushed_at":"2024-08-30T12:49:18.000Z","size":108,"stargazers_count":107,"open_issues_count":1,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-26T05:37:36.264Z","etag":null,"topics":["component","extend","vue-3"],"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/pearofducks.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-19T18:43:26.000Z","updated_at":"2024-11-30T01:47:52.000Z","dependencies_parsed_at":"2024-06-18T16:11:56.100Z","dependency_job_id":"7ba22b5e-f12c-4080-ab47-58d1e457cb62","html_url":"https://github.com/pearofducks/mount-vue-component","commit_stats":{"total_commits":30,"total_committers":1,"mean_commits":30.0,"dds":0.0,"last_synced_commit":"4170215023fcb2c58f34ded6ca2e0b72ff9e6c33"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/pearofducks/mount-vue-component","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pearofducks%2Fmount-vue-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pearofducks%2Fmount-vue-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pearofducks%2Fmount-vue-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pearofducks%2Fmount-vue-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pearofducks","download_url":"https://codeload.github.com/pearofducks/mount-vue-component/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pearofducks%2Fmount-vue-component/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267311556,"owners_count":24067768,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["component","extend","vue-3"],"created_at":"2024-10-31T19:10:56.297Z","updated_at":"2025-07-29T20:35:05.927Z","avatar_url":"https://github.com/pearofducks.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# mount-vue-component\n\n## install\n\n```shell\nyarn add mount-vue-component\n```\n\n## use\n\n```js\nimport { mount } from 'mount-vue-component'\nimport { h } from 'vue'\n\nconst comp = {\n  props: ['name'],\n  setup: (props) =\u003e () =\u003e h('h1', `Hello, ${props.name}!`),\n  unmounted() { console.log(\"Bye\") },\n  mounted() { console.log(\"Hi\") }\n}\nconst { vNode, destroy, el } = mount(comp, { props: { name: 'world' } })\n```\n\n## api\n\n#### `mount(component, { props, children, element, app })`\n\n- `component`: required, the component to be created/mounted\n- `props`: props to be passed onto the component, this can include HTML attributes like `id` or `class`\n- `children`: components to be rendered as children of `component`\n- `element`: if specified, the element to mount the component into, if not specified, a `div` will be created\n- `app`: the Vue app instance from `createApp`, if provided will be bound to the component's `appContext`\n\n##### returns `{ vNode, destroy, el }`\n\n- `vNode`: the instance of the component provided\n- `destroy`: a function that will unmount and destroy the component\n- `el`: will provide the HTML element the component is mounted into\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpearofducks%2Fmount-vue-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpearofducks%2Fmount-vue-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpearofducks%2Fmount-vue-component/lists"}