{"id":19153258,"url":"https://github.com/fatalxiao/vivy-async-component","last_synced_at":"2026-04-17T11:32:00.812Z","repository":{"id":48170710,"uuid":"385183001","full_name":"fatalxiao/vivy-async-component","owner":"fatalxiao","description":"A Vivy plugin which loading async component and async Vivy model to easily split chunks by route.","archived":false,"fork":false,"pushed_at":"2025-07-09T08:32:31.000Z","size":146,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-23T17:32:29.542Z","etag":null,"topics":["react","react-router","redux","router","vivy"],"latest_commit_sha":null,"homepage":"","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/fatalxiao.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":"2021-07-12T08:49:40.000Z","updated_at":"2025-07-09T08:32:34.000Z","dependencies_parsed_at":"2023-02-16T15:01:11.948Z","dependency_job_id":"bd2eaa04-6f31-41ff-a648-136349e36944","html_url":"https://github.com/fatalxiao/vivy-async-component","commit_stats":{"total_commits":269,"total_committers":1,"mean_commits":269.0,"dds":0.0,"last_synced_commit":"525d893767d9d8ab31e6e8dc4e3225d372e8f24c"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/fatalxiao/vivy-async-component","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatalxiao%2Fvivy-async-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatalxiao%2Fvivy-async-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatalxiao%2Fvivy-async-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatalxiao%2Fvivy-async-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fatalxiao","download_url":"https://codeload.github.com/fatalxiao/vivy-async-component/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatalxiao%2Fvivy-async-component/sbom","scorecard":{"id":393580,"data":{"date":"2025-08-11","repo":{"name":"github.com/fatalxiao/vivy-async-component","commit":"d089fb60ce2eb86d63ce7c1875c41252ad601acc"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":10,"reason":"27 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-18T18:25:10.449Z","repository_id":48170710,"created_at":"2025-08-18T18:25:10.449Z","updated_at":"2025-08-18T18:25:10.449Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31927743,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T10:35:34.458Z","status":"ssl_error","status_checked_at":"2026-04-17T10:35:09.472Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["react","react-router","redux","router","vivy"],"created_at":"2024-11-09T08:22:27.853Z","updated_at":"2026-04-17T11:32:00.791Z","avatar_url":"https://github.com/fatalxiao.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[npm-image]: https://img.shields.io/npm/v/vivy-async-component.svg?style=flat-square\n\n[npm-url]: https://npmjs.org/package/vivy-async-component\n\n[license-image]: https://img.shields.io/npm/l/vivy-async-component.svg?style=flat-square\n\n[vivy-url]: https://github.com/fatalxiao/vivy\n\n[with-async-component-plugin-example-url]: https://github.com/fatalxiao/vivy-async-component/tree/main/examples/withAsyncComponentPlugin\n\n[labor-analgesia-frontend-url]: https://github.com/fatalxiao/labor-analgesia-frontend\n\n# vivy-async-component\n\n[![NPM Version][npm-image]][npm-url]\n[![License][license-image]][npm-url]\n\nA [Vivy][vivy-url] plugin to load async component and async Vivy model to easily split chunks by route.\n\n## Docs\n\n* [Installation](#installation)\n* [Examples](#examples)\n    * [Examples in repository](#examples-in-repository)\n    * [Complete and real project example](#complete-and-real-project-example)\n* [Documentation](#documentation)\n    * [Basic usage](#basic-usage)\n    * [Methods](#methods)\n    * [Hooks](#hooks)\n        * [useAsyncComponent](#useAsyncComponent)\n        * [useAsyncComponentLoading](#useAsyncComponentLoading)\n\n## Installation\n\nUsing npm:\n\n```shell\n$ npm install vivy vivy-router vivy-async-component\n```\n\n## Examples\n\n### Examples in repository\n\n```shell\n$ cd ./examples/[EXAMPLE_NAME]\n$ npm run start\n```\n\n**Example names**:\n\n* [withAsyncComponentPlugin][with-async-component-plugin-example-url]\n\n### Complete and real project example\n\n* [labor-analgesia-frontend][labor-analgesia-frontend-url]\n\n## Documentation\n\n### Basic usage\n\nconfigureRoutes.js\n\n```js\n// Import AsyncComponent from plugin\nimport {AsyncComponent} from 'vivy-async-component';\n\nexport default function configureRoutes(store) {\n    return [{\n        path: '/',\n        component: AsyncComponent(() =\u003e import('path_to_your_component'), store, [\n            () =\u003e import('path_to_your_vivy_model_1'),\n            () =\u003e import('path_to_your_vivy_model_2')\n        ])\n    }];\n}\n```\n\nindex.js\n\n```js\nimport React from 'react';\nimport {render} from 'react-dom';\nimport {Provider} from 'react-vivy';\nimport {createBrowserHistory} from 'history';\nimport {renderRoutes} from 'react-router-config';\n\n// Import Vivy\nimport Vivy from 'vivy';\n\n// Import VivyRouter and ConnectedRouter\nimport VivyRouter, {ConnectedRouter} from 'vivy-router';\n\n// Import \nimport VivyAsyncComponent from 'vivy-async-component';\n\n// Routes config\nimport configureRoutes from 'path_to_your_configure_routes';\n\n// Create browser history\nconst history = createBrowserHistory();\n\n// Create vivy\nconst vivy = Vivy();\n\n// Apply router plugin\nvivy.use(VivyRouter({\n    history\n}));\n\n// Apply async component plugin\nvivy.use(VivyAsyncComponent());\n\n// Create store after configuration\nconst store = vivy.createStore();\n\nrender(\n    \u003cProvider store={store}\u003e\n        \u003cConnectedRouter history={history}\u003e\n            {renderRoutes(configureRoutes(store))}\n        \u003c/ConnectedRouter\u003e\n    \u003c/Provider\u003e,\n    document.getElementById('app-container')\n);\n```\n\n### Methods\n\n#### AsyncComponent\n\n`AsyncComponent(getComponent, VivyStoreInstance, getModels)`\n\nExample:\n\n```js\n// Import AsyncComponent from plugin\nimport {AsyncComponent} from 'vivy-async-component';\n\nexport default function configureRoutes(store) {\n    return [{\n        path: 'route_path',\n        component: AsyncComponent(() =\u003e import('path_to_your_component'), store, [\n            () =\u003e import('path_to_your_vivy_model_1'),\n            () =\u003e import('path_to_your_vivy_model_2')\n        ])\n    }];\n}\n```\n\n### Hooks\n\n#### `useAsyncComponent`\n\n```js\nimport {useAsyncComponent} from 'vivy-async-component';\n\nconst [asyncComponentLoading, {start, complete}] = useAsyncComponent();\n```\n\n#### `useAsyncComponentLoading`\n\n```js\nimport {useAsyncComponentLoading} from 'vivy-async-component';\n\nconst asyncComponentLoading = useAsyncComponentLoading();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffatalxiao%2Fvivy-async-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffatalxiao%2Fvivy-async-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffatalxiao%2Fvivy-async-component/lists"}