Skip to content

Commit

Permalink
fix: docs spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
gsfk committed Jun 1, 2024
1 parent ff65194 commit c2abb4b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/api/createSlice.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ reducers: (create) => {

### `extraReducers`

Conceptually, each slice reducer "owns" its slice of state. There's also a natural correspondance between the update logic defined inside `reducers`, and the action types that are generated based on those.
Conceptually, each slice reducer "owns" its slice of state. There's also a natural correspondence between the update logic defined inside `reducers`, and the action types that are generated based on those.

However, there are many times that a Redux slice may also need to update its own state in response to action types that were defined elsewhere in the application (such as clearing many different kinds of data when a "user logged out" action is dispatched). This can include action types defined by another `createSlice` call, actions generated by a `createAsyncThunk`, RTK Query endpoint matchers, or any other action. In addition, one of the key concepts of Redux is that many slice reducers can independently respond to the same action type.

Expand Down
2 changes: 1 addition & 1 deletion docs/rtk-query/api/created-api/hooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ selectFromResult: () => ({})
- `trigger`: A function that triggers an update to the data based on the provided argument. The trigger function returns a promise with the properties shown above that may be used to handle the behavior of the promise
- `mutationState`: A query status object containing the current loading state and metadata about the request, or the values returned by the `selectFromResult` option where applicable.
Additionally, this object will contain
- a `reset` method to reset the hook back to it's original state and remove the current result from the cache
- a `reset` method to reset the hook back to its original state and remove the current result from the cache
- an `originalArgs` property that contains the argument passed to the last call of the `trigger` function.
#### Description
Expand Down
2 changes: 1 addition & 1 deletion docs/rtk-query/api/fetchBaseQuery.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ export const api = createApi({
query: () => ({
url: `users`,
// Example: we know the users endpoint is _really fast_ because it's always cached.
// We can assume if its over > 1000ms, something is wrong and we should abort the request.
// We can assume if it's over > 1000ms, something is wrong and we should abort the request.
timeout: 1000,
}),
}),
Expand Down
2 changes: 1 addition & 1 deletion docs/rtk-query/usage/mutations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Below are some of the most frequently used properties on the "mutation result" o
- `isLoading` - When true, indicates that the mutation has been fired and is awaiting a response.
- `isSuccess` - When true, indicates that the last mutation fired has data from a successful request.
- `isError` - When true, indicates that the last mutation fired resulted in an error state.
- `reset` - A method to reset the hook back to it's original state and remove the current result from the cache
- `reset` - A method to reset the hook back to its original state and remove the current result from the cache

:::note

Expand Down

0 comments on commit c2abb4b

Please sign in to comment.