React hooks for Fetch API with automatic request cancellation on unmount. v0.3.0-rc.2, TypeScript, peer dependency react >= 16.8. Provides useGet, usePost, usePut, usePatch, useDelete hooks with alias-based configuration and built-in loading/error state management. Differentiated by automatic abort, configurable base URLs, and simple API.
npm install fetch-yo-mamaNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic setup with FetchProvider and useGet hook fetching from JSONPlaceholder.
Update component to destructure return value as array of four elements.
Move options object to second parameter: useGet('/url', { params: {} }).If you use clearState, plan to manage state manually or await a replacement.
Wrap your app with <FetchProvider>.
Use a single FetchProvider at the root level.
Wrap your component tree with <FetchProvider> and ensure aliases are defined.
Always call hooks at the top level and destructure exactly [state, fetch, abortRef, clearState].
Provide a string URL as the first argument: useGet('/users').Add a 'default' alias in FetchProvider aliases object.