{"id":19204517,"url":"https://github.com/hyy1115/lazy-load-component","last_synced_at":"2025-05-12T15:46:17.003Z","repository":{"id":135092929,"uuid":"116220821","full_name":"hyy1115/lazy-load-component","owner":"hyy1115","description":"提供webpack异步加载React组件的高阶函数","archived":false,"fork":false,"pushed_at":"2018-01-05T02:12:04.000Z","size":8,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-20T14:42:55.336Z","etag":null,"topics":["async","lazy","lazyload","react","webpack"],"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/hyy1115.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":"2018-01-04T05:57:35.000Z","updated_at":"2023-07-11T11:30:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"3278ec5e-00e0-4da3-a141-f0b3814974c2","html_url":"https://github.com/hyy1115/lazy-load-component","commit_stats":null,"previous_names":["hyy1115/lazyloadcomponent"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyy1115%2Flazy-load-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyy1115%2Flazy-load-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyy1115%2Flazy-load-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyy1115%2Flazy-load-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyy1115","download_url":"https://codeload.github.com/hyy1115/lazy-load-component/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253767712,"owners_count":21961163,"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":["async","lazy","lazyload","react","webpack"],"created_at":"2024-11-09T13:08:30.951Z","updated_at":"2025-05-12T15:46:16.992Z","avatar_url":"https://github.com/hyy1115.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lazy-load-component\n\n### 安装\n```node\nnpm i --save lazy-load-component\n```\n\n### 用法\n如果你的react项目使用了webpack，那么可以使用lazyLoadComponent实现代码切割。\n```javascript\nimport lazyLoadComponent from 'lazy-load-component'\n\nconst Login = lazyLoadComponent(() =\u003e import('./containers/Login'))\n```\n\n### 语法\nlazyLoadComponent支持传入一个Promise属性的函数。\n```javascript\nlazyLoadComponent(fn)\n```\n\n### 注意事项\n你的react组件必须包含default导出模块。","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyy1115%2Flazy-load-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyy1115%2Flazy-load-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyy1115%2Flazy-load-component/lists"}