Skip to content

Commit ac4f4d8

Browse files
committed
Clarify RTK Query status and recommendations in tutorials
1 parent 42d450a commit ac4f4d8

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

docs/redux-toolkit/overview.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Redux Toolkit includes:
5959
- [`createEntityAdapter`](https://redux-toolkit.js.org/api/createEntityAdapter): generates a set of reusable reducers and selectors to manage normalized data in the store
6060
- The [`createSelector` utility](https://redux-toolkit.js.org/api/createSelector) from the [Reselect](https://github.com/reduxjs/reselect) library, re-exported for ease of use.
6161

62-
Redux Toolkit also has a new [**RTK Query data fetching API**](https://redux-toolkit.js.org/rtk-query/overview). RTK Query is a powerful data fetching and caching tool built specifically for Redux. It is designed to simplify common cases for loading data in a web application, eliminating the need to hand-write data fetching & caching logic yourself.
62+
Redux Toolkit also has the [**RTK Query data fetching API**](https://redux-toolkit.js.org/rtk-query/overview). RTK Query is a powerful data fetching and caching tool built specifically for Redux. It is designed to simplify common cases for loading data in a web application, eliminating the need to hand-write data fetching & caching logic yourself.
6363

6464
## Documentation
6565

docs/tutorials/essentials/part-5-async-logic.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ So far, all the data we've worked with has been directly inside of our React cli
2929

3030
In this section, we'll convert our social media app to fetch the posts and users data from an API, and add new posts by saving them to the API.
3131

32+
:::tip
33+
34+
Redux Toolkit includes the [**RTK Query data fetching and caching API**](https://redux-toolkit.js.org/rtk-query/overview). RTK Query is a purpose built data fetching and caching solution for Redux apps, and **can eliminate the need to write _any_ thunks or reducers to manage data fetching**. We specifically teach RTK Query as the default approach for data fetching, and RTK Query is built on the same patterns shown in this page.
35+
36+
We'll cover how to use RTK Query starting in [Part 7: RTK Query Basics](./part-7-rtk-query-basics.md).
37+
38+
:::
39+
3240
### Example REST API and Client
3341

3442
To keep the example project isolated but realistic, the initial project setup already includes a fake in-memory REST API for our data (configured using [the Mock Service Worker mock API tool](https://mswjs.io/)). The API uses `/fakeApi` as the base URL for the endpoints, and supports the typical `GET/POST/PUT/DELETE` HTTP methods for `/fakeApi/posts`, `/fakeApi/users`, and `fakeApi/notifications`. It's defined in `src/api/server.js`.
@@ -170,14 +178,6 @@ However, writing code using this approach is tedious. Each separate type of requ
170178

171179
<br />
172180

173-
:::tip
174-
175-
Redux Toolkit has a new [**RTK Query data fetching API**](https://redux-toolkit.js.org/rtk-query/overview). RTK Query is a purpose built data fetching and caching solution for Redux apps, and **can eliminate the need to write _any_ thunks or reducers to manage data fetching**. We encourage you to try it out and see if it can help simplify the data fetching code in your own apps!
176-
177-
We'll cover how to use RTK Query starting in [Part 7: RTK Query Basics](./part-7-rtk-query-basics.md).
178-
179-
:::
180-
181181
## Loading Posts
182182

183183
So far, our `postsSlice` has used some hardcoded sample data as its initial state. We're going to switch that to start with an empty array of posts instead, and then fetch a list of posts from the server.

docs/tutorials/fundamentals/part-6-async-logic.md

+8
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ In this section, we'll update our todo app to fetch the todos from an API, and a
3535

3636
<FundamentalsWarning />
3737

38+
:::tip
39+
40+
Redux Toolkit includes the [**RTK Query data fetching and caching API**](https://redux-toolkit.js.org/rtk-query/overview). RTK Query is a purpose built data fetching and caching solution for Redux apps, and **can eliminate the need to write _any_ thunks or reducers to manage data fetching**. We specifically teach RTK Query as the default approach for data fetching, and RTK Query is built on the same patterns shown in this page.
41+
42+
Learn how to use RTK Query for data fetching in [Redux Essentials, Part 7: RTK Query Basics](../essentials/part-7-rtk-query-basics.md).
43+
44+
:::
45+
3846
### Example REST API and Client
3947

4048
To keep the example project isolated but realistic, the initial project setup already included a fake in-memory REST API for our data (configured using [the Mirage.js mock API tool](https://miragejs.com/)). The API uses `/fakeApi` as the base URL for the endpoints, and supports the typical `GET/POST/PUT/DELETE` HTTP methods for `/fakeApi/todos`. It's defined in `src/api/server.js`.

0 commit comments

Comments
 (0)