react-suspend-in-parallel

0.0.2 • Public • Published

react-suspend-in-parallel

Utility to run multiple Suspense requests in parallel.

import suspendInParallel from "react-suspend-in-parallel";

function ComponentThatSuspends(props) {
  const [thingOne, thingTwo] = suspendInParallel(
    () => fetchThingOne(props.id),
    () => fetchThingTwo(props.id),
    // ...
  );

  // Render...
}

Readme

Keywords

none

Package Sidebar

Install

npm i react-suspend-in-parallel

Weekly Downloads

1

Version

0.0.2

License

ISC

Unpacked Size

3.54 kB

Total Files

8

Last publish

Collaborators

  • brianvaughn