bvaughn / react-suspend-in-parallel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About


Languages

Language:TypeScript 89.5%Language:JavaScript 10.5%