Content-Length: 282709 | pFad | http://github.com/Hermanya/use-suspense-today

5F GitHub - Hermanya/use-suspense-today: ⏳ Use React Suspense today, with any data fetching library
Skip to content

⏳ Use React Suspense today, with any data fetching library

Notifications You must be signed in to change notification settings

Hermanya/use-suspense-today

Repository files navigation

use-suspense-today

Use React Suspense today, with any data fetching library

NPM JavaScript Style Guide

Install

npm install --save use-suspense-today

Usage

import * as React from 'react'
import { useSuspense } from 'use-suspense-today'

const Child = () => {
  const { loading, data } = useApiThatIsNotSuspenseReady();
  useSuspense(loading);
  return <section>{data}</section>;
};

const Parent = () => {
  return (
    <React.Suspense fallback={<div>Loading...</div>}>
      <Child />
    </React.Suspense>
  );
};

License

MIT © Hermanya


This hook is created using create-react-hook.

About

⏳ Use React Suspense today, with any data fetching library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/Hermanya/use-suspense-today

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy