@tanstack/solid-query 4.7.2 → 4.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2480,12 +2480,15 @@
2480
2480
  }
2481
2481
 
2482
2482
  const isFetching = fetchStatus === 'fetching';
2483
+ const isLoading = status === 'loading';
2484
+ const isError = status === 'error';
2483
2485
  const result = {
2484
2486
  status,
2485
2487
  fetchStatus,
2486
- isLoading: status === 'loading',
2488
+ isLoading,
2487
2489
  isSuccess: status === 'success',
2488
- isError: status === 'error',
2490
+ isError,
2491
+ isInitialLoading: isLoading && isFetching,
2489
2492
  data,
2490
2493
  dataUpdatedAt,
2491
2494
  error,
@@ -2494,13 +2497,13 @@
2494
2497
  errorUpdateCount: state.errorUpdateCount,
2495
2498
  isFetched: state.dataUpdateCount > 0 || state.errorUpdateCount > 0,
2496
2499
  isFetchedAfterMount: state.dataUpdateCount > queryInitialState.dataUpdateCount || state.errorUpdateCount > queryInitialState.errorUpdateCount,
2497
- isFetching: isFetching,
2498
- isRefetching: isFetching && status !== 'loading',
2499
- isLoadingError: status === 'error' && state.dataUpdatedAt === 0,
2500
+ isFetching,
2501
+ isRefetching: isFetching && !isLoading,
2502
+ isLoadingError: isError && state.dataUpdatedAt === 0,
2500
2503
  isPaused: fetchStatus === 'paused',
2501
2504
  isPlaceholderData,
2502
2505
  isPreviousData,
2503
- isRefetchError: status === 'error' && state.dataUpdatedAt !== 0,
2506
+ isRefetchError: isError && state.dataUpdatedAt !== 0,
2504
2507
  isStale: isStale(query, options),
2505
2508
  refetch: this.refetch,
2506
2509
  remove: this.remove