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