floppy-disk 2.1.1 → 2.2.0-beta.1
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.
|
@@ -40,8 +40,9 @@ const useQueryDefaultDeps = (state) => [
|
|
|
40
40
|
state.hasNextPage,
|
|
41
41
|
];
|
|
42
42
|
export const createQuery = (queryFn, options = {}) => {
|
|
43
|
+
const defaultFetchOnWindowFocus = options.fetchOnMount !== false;
|
|
43
44
|
const { onFirstSubscribe = noop, onSubscribe = noop, onLastUnsubscribe = noop, onBeforeChangeKey = noop, defaultDeps = useQueryDefaultDeps, select = identityFn, staleTime = 3000, // 3 seconds
|
|
44
|
-
fetchOnMount = true, fetchOnWindowFocus =
|
|
45
|
+
fetchOnMount = true, fetchOnWindowFocus = defaultFetchOnWindowFocus, enabled = true, retry = 1, retryDelay = 2000, // 2 seconds
|
|
45
46
|
keepPreviousData, getNextPageParam = () => undefined, onSuccess = noop, onError = noop, onSettled = noop, ...createStoresOptions } = options;
|
|
46
47
|
const retryTimeoutId = new Map();
|
|
47
48
|
const retryNextPageTimeoutId = new Map();
|
|
@@ -40,8 +40,9 @@ const useQueryDefaultDeps = (state) => [
|
|
|
40
40
|
state.hasNextPage,
|
|
41
41
|
];
|
|
42
42
|
export const createQuery = (queryFn, options = {}) => {
|
|
43
|
+
const defaultFetchOnWindowFocus = options.fetchOnMount !== false;
|
|
43
44
|
const { onFirstSubscribe = noop, onSubscribe = noop, onLastUnsubscribe = noop, onBeforeChangeKey = noop, defaultDeps = useQueryDefaultDeps, select = identityFn, staleTime = 3000, // 3 seconds
|
|
44
|
-
fetchOnMount = true, fetchOnWindowFocus =
|
|
45
|
+
fetchOnMount = true, fetchOnWindowFocus = defaultFetchOnWindowFocus, enabled = true, retry = 1, retryDelay = 2000, // 2 seconds
|
|
45
46
|
keepPreviousData, getNextPageParam = () => undefined, onSuccess = noop, onError = noop, onSettled = noop, ...createStoresOptions } = options;
|
|
46
47
|
const retryTimeoutId = new Map();
|
|
47
48
|
const retryNextPageTimeoutId = new Map();
|
|
@@ -43,8 +43,9 @@ const useQueryDefaultDeps = (state) => [
|
|
|
43
43
|
state.hasNextPage,
|
|
44
44
|
];
|
|
45
45
|
const createQuery = (queryFn, options = {}) => {
|
|
46
|
+
const defaultFetchOnWindowFocus = options.fetchOnMount !== false;
|
|
46
47
|
const { onFirstSubscribe = utils_1.noop, onSubscribe = utils_1.noop, onLastUnsubscribe = utils_1.noop, onBeforeChangeKey = utils_1.noop, defaultDeps = useQueryDefaultDeps, select = utils_1.identityFn, staleTime = 3000, // 3 seconds
|
|
47
|
-
fetchOnMount = true, fetchOnWindowFocus =
|
|
48
|
+
fetchOnMount = true, fetchOnWindowFocus = defaultFetchOnWindowFocus, enabled = true, retry = 1, retryDelay = 2000, // 2 seconds
|
|
48
49
|
keepPreviousData, getNextPageParam = () => undefined, onSuccess = utils_1.noop, onError = utils_1.noop, onSettled = utils_1.noop, ...createStoresOptions } = options;
|
|
49
50
|
const retryTimeoutId = new Map();
|
|
50
51
|
const retryNextPageTimeoutId = new Map();
|
|
@@ -43,8 +43,9 @@ const useQueryDefaultDeps = (state) => [
|
|
|
43
43
|
state.hasNextPage,
|
|
44
44
|
];
|
|
45
45
|
const createQuery = (queryFn, options = {}) => {
|
|
46
|
+
const defaultFetchOnWindowFocus = options.fetchOnMount !== false;
|
|
46
47
|
const { onFirstSubscribe = utils_1.noop, onSubscribe = utils_1.noop, onLastUnsubscribe = utils_1.noop, onBeforeChangeKey = utils_1.noop, defaultDeps = useQueryDefaultDeps, select = utils_1.identityFn, staleTime = 3000, // 3 seconds
|
|
47
|
-
fetchOnMount = true, fetchOnWindowFocus =
|
|
48
|
+
fetchOnMount = true, fetchOnWindowFocus = defaultFetchOnWindowFocus, enabled = true, retry = 1, retryDelay = 2000, // 2 seconds
|
|
48
49
|
keepPreviousData, getNextPageParam = () => undefined, onSuccess = utils_1.noop, onError = utils_1.noop, onSettled = utils_1.noop, ...createStoresOptions } = options;
|
|
49
50
|
const retryTimeoutId = new Map();
|
|
50
51
|
const retryNextPageTimeoutId = new Map();
|