{"id":21553109,"url":"https://github.com/oussamamessaoudi/fetch-react","last_synced_at":"2026-04-11T21:47:23.535Z","repository":{"id":35151457,"uuid":"213458478","full_name":"oussamamessaoudi/fetch-react","owner":"oussamamessaoudi","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-04T22:17:08.000Z","size":197,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-20T10:20:42.713Z","etag":null,"topics":["axios","fetch","javascript","react","react-native","reactjs","superagent","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oussamamessaoudi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-07T18:35:36.000Z","updated_at":"2019-12-20T15:38:33.000Z","dependencies_parsed_at":"2023-01-15T14:51:34.885Z","dependency_job_id":null,"html_url":"https://github.com/oussamamessaoudi/fetch-react","commit_stats":null,"previous_names":["oussamamessaoudi/fetch_react"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oussamamessaoudi%2Ffetch-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oussamamessaoudi%2Ffetch-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oussamamessaoudi%2Ffetch-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oussamamessaoudi%2Ffetch-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oussamamessaoudi","download_url":"https://codeload.github.com/oussamamessaoudi/fetch-react/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244144475,"owners_count":20405450,"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":["axios","fetch","javascript","react","react-native","reactjs","superagent","typescript"],"created_at":"2024-11-24T07:09:32.058Z","updated_at":"2026-04-11T21:47:18.510Z","avatar_url":"https://github.com/oussamamessaoudi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fetch-react\n\n\nFetching data using React Component.\n\n\n## Installation\n\nAdd dependency to your project.\n```sh\nnpm install @react-items/fetch --save\n```\n    \n## Quick Start\n\n```jsx\nimport React from 'react';\nimport Fetch, {Error, FetchContext, Success} from '@react-items/fetch';\n\nconst defaultValues = {\n    Loading: \u003cdiv\u003eLoading\u003c/div\u003e,\n    NotConnected: (response, status, httpStatus) =\u003e (\n        \u003cdiv\u003e\n            \u003cdiv\u003eNotConnected\u003c/div\u003e\n            \u003cdiv\u003e{JSON.stringify(response)}\u003c/div\u003e\n            \u003cdiv\u003e{status}\u003c/div\u003e\n            \u003cdiv\u003e{httpStatus}\u003c/div\u003e\n        \u003c/div\u003e\n    )\n};\n\nconst App = () =\u003e (\n    \u003cFetchContext.Provider value={defaultValues}\u003e\n        \u003cFetch url={'https://jsonplaceholder.typicode.com/todos/1'}\u003e\n            \u003cSuccess\u003e\n                {(response, status, httpStatus) =\u003e\n                    \u003cdiv\u003e\n                        \u003cdiv\u003eSuccess\u003c/div\u003e\n                        \u003cdiv\u003e{JSON.stringify(response)}\u003c/div\u003e\n                        \u003cdiv\u003e{status}\u003c/div\u003e\n                        \u003cdiv\u003e{httpStatus}\u003c/div\u003e\n                    \u003c/div\u003e\n                }\n            \u003c/Success\u003e\n            \u003cError\u003e\n                {(response, status, httpStatus) =\u003e\n                    \u003cdiv\u003e\n                        \u003cdiv\u003eError\u003c/div\u003e\n                        \u003cdiv\u003e{JSON.stringify(response)}\u003c/div\u003e\n                        \u003cdiv\u003e{status}\u003c/div\u003e\n                        \u003cdiv\u003e{httpStatus}\u003c/div\u003e\n                    \u003c/div\u003e\n                }\n            \u003c/Error\u003e\n        \u003c/Fetch\u003e\n    \u003c/FetchContext.Provider\u003e\n);\n```\n# Author\n\nOussama MESSAOUDI - [@Oussama Messaoudi](https://github.com/oussamamessaoudi/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foussamamessaoudi%2Ffetch-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foussamamessaoudi%2Ffetch-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foussamamessaoudi%2Ffetch-react/lists"}