Derive the deprecated fetcher.type from the current state of a fetcher.
fetcher.type
The fetcher object returned form useFetcher
fetcher
useFetcher
let fetcher = useFetcher();let fetcherType = useFetcherType(fetcher);useEffect(() => { if (fetcherType === "done") // do something once fetcher is done}, [fetcherType]); Copy
let fetcher = useFetcher();let fetcherType = useFetcherType(fetcher);useEffect(() => { if (fetcherType === "done") // do something once fetcher is done}, [fetcherType]);
Derive the deprecated
fetcher.type
from the current state of a fetcher.