• Utility function that will wrap an arbitrary promise in order for it to conform to the React Suspense API. By utilizing this higher order function React components can participate in the Suspense workflow and enable the application to display fallback behaviour while KOS data models or APIs are being fetched.

    Type Parameters

    • T

    Parameters

    • promise: Promise<T>

      The promise to be resolved

    Returns {
        read: (() => T);
    }

    an Object with a single read function that will be used to broadcast status back to the React framework.

    • read: (() => T)
        • (): T
        • Returns T