{"id":49062,"library":"react-fetch","title":"react-fetch","description":"A React component for fetching data from an API and rendering the result. This package (v0.0.9) provides a <Fetch> component that takes a URL and options and renders based on the fetch state (loading, error, fetched). It uses a render prop pattern and works with React 0.14+. The package is extremely minimal but has been abandoned since 2016 with no updates; the pattern is often mocked using hooks like useFetch. It is not recommended for new projects due to lack of maintenance and the render prop approach being outdated.","status":"abandoned","version":"0.0.9","language":"javascript","source_language":"en","source_url":"https://github.com/zackify/react-fetch","tags":["javascript","reactjs","fetch","input","component"],"install":[{"cmd":"npm install react-fetch","lang":"bash","label":"npm"},{"cmd":"yarn add react-fetch","lang":"bash","label":"yarn"},{"cmd":"pnpm add react-fetch","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency for React components","package":"react","optional":false}],"imports":[{"note":"This package uses a default export, not a named export. Named import will result in undefined.","wrong":"import { Fetch } from 'react-fetch'","symbol":"Fetch","correct":"import Fetch from 'react-fetch'"},{"note":"CommonJS require returns the default export directly.","wrong":"const { Fetch } = require('react-fetch')","symbol":"Fetch (CommonJS)","correct":"const Fetch = require('react-fetch')"}],"quickstart":{"code":"import React from 'react';\nimport Fetch from 'react-fetch';\n\nfunction App() {\n  return (\n    <Fetch url=\"https://api.example.com/data\">\n      {(data, error, loading) => {\n        if (loading) return <p>Loading...</p>;\n        if (error) return <p>Error: {error.message}</p>;\n        return <p>Data: {JSON.stringify(data)}</p>;\n      }}\n    </Fetch>\n  );\n}\n\nexport default App;","lang":"javascript","description":"Shows basic usage of the Fetch component with a render prop for loading, error, and success states."},"warnings":[{"fix":"Replace with @tanstack/react-query or swr.","message":"Package has not been updated since 2016. Use modern fetch hooks like useFetch or React Query instead.","severity":"deprecated","affected_versions":"0.0.9"}],"env_vars":null,"search_vec":"'0.14':49 '2016':60 'abandon':58 'api':12 'approach':89 'base':31 'compon':6,22,96 'data':9 'due':80 'error':37 'extrem':53 'fetch':3,8,34,38,94 'hook':70 'input':95 'javascript':92 'lack':82 'like':71 'load':36 'mainten':84 'minim':54 'mock':68 'new':78 'often':67 'option':28 'outdat':91 'packag':18,51 'pattern':44,65 'project':79 'prop':43,88 'provid':20 'react':2,5,48 'react-fetch':1 'reactj':93 'recommend':76 'render':14,30,42,87 'result':16 'sinc':59 'state':35 'take':24 'updat':63 'url':26 'use':40,69 'usefetch':72 'v0.0.9':19 'work':46","created_at":"2026-06-07T16:59:51.436027+00:00","updated_at":"2026-06-07T16:59:51.436027+00:00","problems":[{"fix":"Use 'import Fetch from 'react-fetch'' instead of 'import { Fetch } from 'react-fetch''.","cause":"Importing as named export instead of default import.","error":"Uncaught TypeError: Cannot read property 'fetch' of undefined"},{"fix":"Use it as a JSX component: <Fetch url='...'>...</Fetch>","cause":"Using new Fetch(...) instead of <Fetch .../> as a component.","error":"Uncaught TypeError: Fetch is not a constructor"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/zackify/react-fetch","github":"https://github.com/zackify/react-fetch","docs":null,"changelog":null,"pypi":null,"npm":"react-fetch","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}