{"id":25126683,"url":"https://github.com/bebo/react-simple-fetch","last_synced_at":"2025-10-25T00:10:37.450Z","repository":{"id":57344664,"uuid":"67091502","full_name":"bebo/react-simple-fetch","owner":"bebo","description":"React component to fetch() data and automatically bind the result as props for the child component(s).","archived":false,"fork":false,"pushed_at":"2016-09-01T10:15:23.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-10T21:41:13.231Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bebo.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":"2016-09-01T02:38:47.000Z","updated_at":"2024-05-17T16:45:08.000Z","dependencies_parsed_at":"2022-09-11T09:01:57.509Z","dependency_job_id":null,"html_url":"https://github.com/bebo/react-simple-fetch","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/bebo%2Freact-simple-fetch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bebo%2Freact-simple-fetch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bebo%2Freact-simple-fetch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bebo%2Freact-simple-fetch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bebo","download_url":"https://codeload.github.com/bebo/react-simple-fetch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246883067,"owners_count":20849391,"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":"2025-02-08T10:24:18.933Z","updated_at":"2025-10-25T00:10:37.384Z","avatar_url":"https://github.com/bebo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-simple-fetch\n\nReact component to fetch() data and automatically bind the result as props for the child component(s).\n\n## Get it\n\n```npm install react-simple-fetch --save```\n\n## Usage\n\n```jsx\nimport SimpleFetch from 'react-simple-fetch';\n\n\u003cSimpleFetch url='https://api.github.com/repos/octocat/Hello-World'\u003e\n  \u003cYourAwesomeComponent /\u003e\n\u003c/SimpleFetch\u003e\n```\n\nThe props types of the `SimpleFetch` component are:\n\n```js\ntype Props = {\n  children: \u003cReactElement\u003e, // yes a single react element\n  url: string,\n  path: ?string, // defaults to ''\n  as: ?string, // defaults to 'fetched' (your data would be in your child compoent as 'this.props.fetched')\n  forceHttps: ?bool, // defaults to true (turn any URL you pass to https)\n  mapResponse: ?any, // defaults to 'auto' (other options are true and false) [can usually be left on 'auto mode']\n  loader: ?\u003cReactElement\u003e, // pass any jsx dom or component that should be rendered while we go out and fetch the data\n};\n```\n\n\n## Examples\n\n#### Object Result\n```jsx\n\u003cSimpleFetch url='https://api.github.com/repos/octocat/Hello-World' as='repo'\u003e\n// will render once the fetch() returns\n// will have the returned data available on 'this.props.repo'\n  \u003cGitHubRepoComponent /\u003e\n\u003c/SimpleFetch\u003e\n```\n\n#### Array Result\n```jsx\n\u003cSimpleFetch url='https://api.github.com/repos/octocat/Hello-World/stargazers' as='star'\u003e\n// will render once the fetch() returns\n// as the result is an Array we will automatically map over it and render as many \u003cStargazer /\u003e elements as necessary\n// individual \u003cStargazer /\u003e elements will have their data available on 'this.props.star'\n  \u003cStargazer /\u003e\n\u003c/SimpleFetch\u003e\n```\n\n### (More \u0026 better docs coming soon...)\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub. This project is intended to be a\nsafe, welcoming space for collaboration, and contributors are expected to adhere\nto the [Contributor Covenant](http://contributor-covenant.org/) code of conduct.\n\n## License\n\n```\n _________________\n\u003c The MIT License \u003e\n -----------------\n        \\   ^__^\n         \\  (oo)\\_______\n            (__)\\       )\\/\\\n                ||----w |\n                ||     ||\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbebo%2Freact-simple-fetch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbebo%2Freact-simple-fetch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbebo%2Freact-simple-fetch/lists"}