@rest-hooks/legacy
TypeScript icon, indicating that this package has built-in type declarations

9.0.3 • Public • Published

🛌🎣 Rest Hooks Legacy

CircleCI Coverage Status npm downloads bundle size npm version PRs Welcome

Rest Hooks legacy support.

shapeToEndpoint

import { shapeToEndpoint } from '@rest-hooks/legacy';

function MyComponent() {
  const endpoint: any = useMemo(() => {
    return shapeToEndpoint(fetchShape);
    // we currently don't support shape changes
    // eslint-disable-next-line react-hooks/exhaustive-deps
  }, []);
  const mydata = useSuspense(endpoint, params);
  //...
}

/@rest-hooks/legacy/

    Package Sidebar

    Install

    npm i @rest-hooks/legacy

    Weekly Downloads

    296

    Version

    9.0.3

    License

    Apache-2.0

    Unpacked Size

    320 kB

    Total Files

    104

    Last publish

    Collaborators

    • ntucker
    • ljharb