matrix-react-sdk
Version:
SDK for matrix.org using React
6 lines (5 loc) • 305 B
TypeScript
/**
* Hook to prevent a slower response to an earlier query overwriting the result to a faster response of a later query
* @param onResultChanged
*/
export declare const useLatestResult: <T, R>(onResultChanged: (result: R) => void) => [(query: T | null) => void, (query: T | null, result: R) => void];