0.0.2 • Published 2 years ago

react-suspend-in-parallel v0.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

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...
}
0.0.2

2 years ago

0.0.1

2 years ago