{"id":13525050,"url":"https://github.com/mjanssen/preact-route-async","last_synced_at":"2025-04-01T04:30:48.119Z","repository":{"id":57329536,"uuid":"145987000","full_name":"mjanssen/preact-route-async","owner":"mjanssen","description":"Easy asynchronous loading for your router components. For 440B.","archived":false,"fork":false,"pushed_at":"2018-08-28T20:59:59.000Z","size":30,"stargazers_count":35,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-12T02:55:56.145Z","etag":null,"topics":["microbundle","preact","preact-components","preact-router"],"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/mjanssen.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}},"created_at":"2018-08-24T12:10:24.000Z","updated_at":"2024-06-07T23:34:03.000Z","dependencies_parsed_at":"2022-09-14T22:22:20.373Z","dependency_job_id":null,"html_url":"https://github.com/mjanssen/preact-route-async","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjanssen%2Fpreact-route-async","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjanssen%2Fpreact-route-async/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjanssen%2Fpreact-route-async/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjanssen%2Fpreact-route-async/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mjanssen","download_url":"https://codeload.github.com/mjanssen/preact-route-async/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222698210,"owners_count":17024879,"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":["microbundle","preact","preact-components","preact-router"],"created_at":"2024-08-01T06:01:15.572Z","updated_at":"2024-11-02T09:30:42.032Z","avatar_url":"https://github.com/mjanssen.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# Preact route async\n\n[![npm](https://img.shields.io/npm/v/preact-route-async.svg)](http://npm.im/preact-route-async)\n[![gzip size](http://img.badgesize.io/https://unpkg.com/preact-route-async/dist/preact-route-async.js?compression=gzip)](https://unpkg.com/preact-route-async/dist/preact-route-async.js)\n\n**Asynchronous** loading for Preact Router. For _440B_.\n\nInspired by [preact-async-route](https://github.com/prateekbh/preact-async-route). Bundled with [📦 Microbundle](https://github.com/developit/microbundle)\n\n# Install\n\n```\nnpm install --save preact-route-async\n```\n\n# Usage\n\n```\nimport Router from 'preact-router';\nimport Route from 'preact-route-async';\n\n\u003cRouter\u003e\n  \u003cRoute path=\"/\" component={Home} /\u003e\n  \u003cRoute\n    path=\"/user\"\n    user={user}\n    getComponent={() =\u003e import('./pages/user.js')}\n  /\u003e\n\u003c/Router\u003e\n```\n\n# Options\n\nProps and children wil automatically be passed to the fetched Component.\nThe library also passes the `path` property, coming from `preact-router` to the Component.\n\n# Demo\n\nCode demo [can be found here](https://codesandbox.io/s/k20z33l3w7)\n\n# License\n\n[MIT](https://oss.ninja/mit/mjanssen/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmjanssen%2Fpreact-route-async","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmjanssen%2Fpreact-route-async","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmjanssen%2Fpreact-route-async/lists"}