Skip to content

Commit d45faac

Browse files
committed
enhance: Move args above endpoint in action
1 parent 597a1b2 commit d45faac

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

docs/core/getting-started/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ follow the instructions to [add legacy browser support to packages](../guides/le
5858
</details>
5959

6060
<details>
61-
<summary><b>ReactJS 16+ and React Native</b></summary>
61+
<summary><b>ReactJS 16-19 and React Native</b></summary>
6262

6363
ReactJS 16.2 and above is supported (the one with hooks!). React 18 provides improved [Suspense](../api/useSuspense.md)
6464
support and features. Both React Native, [React Navigation](https://reactnavigation.org/) and [Expo](https://docs.expo.dev) are supported.

packages/core/src/controller/actions/createFetch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ export function createFetch<
2828
return {
2929
type: FETCH_TYPE,
3030
key: endpoint.key(...args),
31-
endpoint,
3231
args,
32+
endpoint,
3333
meta,
3434
};
3535
}

packages/core/src/controller/actions/createOptimistic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ export function createOptimistic<
2525
return {
2626
type: OPTIMISTIC_TYPE,
2727
key: endpoint.key(...args),
28-
endpoint,
2928
args,
29+
endpoint,
3030
meta: createMeta(endpoint.dataExpiryLength ?? 60000, fetchedAt),
3131
};
3232
}

packages/core/src/controller/actions/createSet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ export function createSet<S extends Queryable>(
2424
return {
2525
type: SET_TYPE,
2626
value,
27-
schema,
2827
args: args.map(ensurePojo) as SchemaArgs<S>,
28+
schema,
2929
meta: createMeta(60000, fetchedAt),
3030
};
3131
}

packages/core/src/controller/actions/createSetResponse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ export function createSetResponse<
6565
type: SET_RESPONSE_TYPE,
6666
key: endpoint.key(...args),
6767
response,
68-
endpoint,
6968
args: args.map(ensurePojo),
69+
endpoint,
7070
meta: createMeta(expiryLength, fetchedAt),
7171
error,
7272
};

packages/core/src/controller/actions/createSubscription.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function createUnsubscription<E extends EndpointInterface>(
2222
return {
2323
type: UNSUBSCRIBE_TYPE,
2424
key: endpoint.key(...args),
25-
endpoint,
2625
args,
26+
endpoint,
2727
};
2828
}

0 commit comments

Comments
 (0)