add comment
This commit is contained in:
parent
603fde07d1
commit
6735075880
1 changed files with 3 additions and 0 deletions
|
@ -1,6 +1,9 @@
|
|||
import { useEffect, useRef } from 'react';
|
||||
import { isPromise } from '../utils';
|
||||
|
||||
// useEffectSingleThreaded is a useEffect that will only run one at a time, and will
|
||||
// caches the latest deps of requests that come in while it is running, and will
|
||||
// run that after the current run is complete.
|
||||
export default function useEffectSingleThreaded(
|
||||
fn: (deps) => void | Promise<void>,
|
||||
deps: any[]
|
||||
|
|
Loading…
Add table
Reference in a new issue