Skip to content

Commit

Permalink
fix: typo in usage doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua-Prakasam committed Jan 1, 2024
1 parent 3154240 commit 970ddf4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/usage/UsageWithTypescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ const fetchUserById = createAsyncThunk(
const lastReturnedAction = await store.dispatch(fetchUserById(3))
```

If you need to modify the types of the `thunkApi` parameter, such as supplying the type of the `state` returned by `getState()`, you must supply the first two generic arguments for return type and payload argument, plus whicher "thunkApi argument fields" are relevant in an object:
If you need to modify the types of the `thunkApi` parameter, such as supplying the type of the `state` returned by `getState()`, you must supply the first two generic arguments for return type and payload argument, plus whichever "thunkApi argument fields" are relevant in an object:

```ts
const fetchUserById = createAsyncThunk<
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/WritingCustomMiddleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ In the first part, it listens to `addListener`, `clearAllListeners` and `removeL

In the second part, the code mainly calculates the state after passing the action through the other middlewares and the reducer, and then passes both the original state as well as the new state coming from the reducer to the listeners.

It is common to have side effects after dispatching th eaction, because this allows taking into account both the original and the new state, and because the interaction coming from the side effects shouldn't influence the current action execution anyways (otherwise, it wouldn't be a side effect).
It is common to have side effects after dispatching the action, because this allows taking into account both the original and the new state, and because the interaction coming from the side effects shouldn't influence the current action execution anyways (otherwise, it wouldn't be a side effect).

### Modify or cancel actions, or modify the input accepted by dispatch

Expand Down

0 comments on commit 970ddf4

Please sign in to comment.