Remix Utils - v9.0.0
    Preparing search index...

    Function useFetcherType

    • Derive the deprecated fetcher.type from the current state of a fetcher.

      Parameters

      • fetcher: FetcherWithComponents<unknown>

        The fetcher object returned form useFetcher

      Returns FetcherType

      let fetcher = useFetcher();
      let fetcherType = useFetcherType(fetcher);
      useEffect(() => {
      if (fetcherType === "done") // do something once fetcher is done
      }, [fetcherType]);