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.
npm install react-fetchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage of the Fetch component with a render prop for loading, error, and success states.
Replace with @tanstack/react-query or swr.
Use 'import Fetch from 'react-fetch'' instead of 'import { Fetch } from 'react-fetch''.Use it as a JSX component: <Fetch url='...'>...</Fetch>