Provides React hooks for fetching and mutating REST API data. v1.9.0 (last release) relies on axios and use-store-hook to share cached state across components without Context or prop-drilling. Offers auto-loading, polling, query support, and collection self-maintenance. Designed for React 16.10+, but no longer actively maintained; alternatives include React Query, SWR, and RTK Query.
npm install react-use-restNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Create a REST hook for /api/kittens and display loading state and data.
Consider migrating to React Query, SWR, or RTK Query.
Upgrade React to 16.10+ or use alternative hooks library.
Use const useMyHook = createRestHook(endpoint) directly.
No action needed, but be aware of unexpected side effects.
Use import { createRestHook } from 'react-use-rest'Run npm install use-store-hook@latest
Check isLoading and data existence: let { data, isLoading } = useKittens(); if (isLoading) return '...';