react-query#useIsMutating TypeScript Examples

The following examples show how to use react-query#useIsMutating. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.tsx    From RareCamp with Apache License 2.0 6 votes vote down vote up
export default function GlobalLoadingIndicator() {
  const isFetching = useIsFetching()
  const isMutating = useIsMutating()

  return isFetching || isMutating ? (
    <Progress
      style={{ position: 'fixed', top: -12, left: 0, zIndex: 99999 }}
      strokeColor={{
        from: '#66bb6a',
        to: '#5c6bc0',
      }}
      percent={100}
      showInfo={false}
      status="active"
    />
  ) : null
}