{"id":22913950,"url":"https://github.com/bentatum/async-connect","last_synced_at":"2026-02-18T07:02:56.833Z","repository":{"id":57141608,"uuid":"78650134","full_name":"bentatum/async-connect","owner":"bentatum","description":"Require component dependencies via React hoc - compatible with react-router v4.0.x","archived":false,"fork":false,"pushed_at":"2017-11-09T01:14:15.000Z","size":59,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-30T12:20:44.860Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bentatum.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-11T15:06:45.000Z","updated_at":"2017-08-16T20:19:21.000Z","dependencies_parsed_at":"2022-09-03T07:40:36.753Z","dependency_job_id":null,"html_url":"https://github.com/bentatum/async-connect","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/bentatum%2Fasync-connect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentatum%2Fasync-connect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentatum%2Fasync-connect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentatum%2Fasync-connect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bentatum","download_url":"https://codeload.github.com/bentatum/async-connect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253547214,"owners_count":21925544,"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":[],"created_at":"2024-12-14T05:12:37.295Z","updated_at":"2025-05-12T13:43:01.466Z","avatar_url":"https://github.com/bentatum.png","language":"JavaScript","readme":"# async-conncect\n\n[![npm][npm-image]][npm-url]\n[![travis][travis-image]][travis-url]\n[![standard][standard-image]][standard-url]\n\n[npm-image]: https://img.shields.io/npm/v/async-conncect.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/async-conncect\n[travis-image]: https://img.shields.io/travis/bentatum/async-conncect.svg?style=flat-square\n[travis-url]: https://travis-ci.org/bentatum/async-conncect\n[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\n[standard-url]: http://npm.im/standard\n\n## Install\n\n```\nyarn add async-conncect \n```\n\n## Usage\n\n```js\nimport { compose } from 'recompact'\nimport asyncConnect from 'async-conncect'\nimport { connect } from 'react-redux'\n\nconst enhance = compose(\n  // this will call getUser and getOtherThing on componentDidMount as long as it's corresponding status isnt pending, success or failure.\n  asyncConnect([\n    {\n      type: '@@my-app/getUser',\n      action: getUser,\n      payload: {\n        id: 123\n      }\n    },\n    {\n      type: '@@my-app/getOtherThing',\n      action: getOtherThing,\n      payload: {\n        id: 456\n      }\n    }\n  ]),\n  // you'll need to map the response of your action, thunk, saga (er, whatever) in your app's state reducer.\n  connect(({ user }) =\u003e ({ user }))\n)\n\nexport default enhance(props =\u003e props.user.name\n\n```\n\n## Contributing\n\nContributions welcome! Please read the [contributing guidelines](CONTRIBUTING.md) first.\n\n## License\n\n[ISC](LICENSE.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbentatum%2Fasync-connect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbentatum%2Fasync-connect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbentatum%2Fasync-connect/lists"}