Skip to content

Commit 4b89e8e

Browse files
committed
Fix "side effects" typos
1 parent 9328557 commit 4b89e8e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/usage/side-effects-approaches.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Thunks work by passing a function into `dispatch`. The thunk middleware intercep
8787

8888
Thunks are best used for complex sync logic that needs access to `dispatch` and `getState`, or moderate async logic such as one-shot "fetch some async data and dispatch an action with the result" requests.
8989

90-
We have traditionally recommended thunks as the default Redux Toolkit specifically includes the [`createAsyncThunk` API](https://redux-toolkit.js.org/api/createAsyncThunk) for the "request and dispatch" use case. For other use cases, you can write your own thunk functions.
90+
We have traditionally recommended thunks as the default approach, and Redux Toolkit specifically includes the [`createAsyncThunk` API](https://redux-toolkit.js.org/api/createAsyncThunk) for the "request and dispatch" use case. For other use cases, you can write your own thunk functions.
9191

9292
#### Thunk Tradeoffs
9393

@@ -154,7 +154,7 @@ Saga users have often pointed to the fact that saga functions only return _descr
154154
#### Saga Tradeoffs
155155

156156
- 👍: Sagas are testable because they only return descriptions of effects; powerful effects model; pause/cancel capabilities
157-
- 👎: generator functions are complex; unique saga effects API; saga tests often only test implementation results and need to be rewritten every time the saga is touched, making them a lot less valuable; do not work well with TypeScript; cannot
157+
- 👎: generator functions are complex; unique saga effects API; saga tests often only test implementation results and need to be rewritten every time the saga is touched, making them a lot less valuable; do not work well with TypeScript;
158158

159159
```js title="Saga Examples"
160160
import { call, put, takeEvery } from 'redux-saga/effects'
@@ -256,7 +256,7 @@ In addition, listener entries can be added and removed dynamically at runtime by
256256

257257
#### Listener Tradeoffs
258258

259-
- 👍: Built into Redux Tolkit; `async/await` is more familiar syntax; similar to thunks; lightweight concepts and size; works great with TypeScript
259+
- 👍: Built into Redux Toolkit; `async/await` is more familiar syntax; similar to thunks; lightweight concepts and size; works great with TypeScript
260260
- 👎: Relatively new and not as "battle-tested" yet; not _quite_ as flexible as sagas/observables
261261

262262
```js title="Listener Examples"

0 commit comments

Comments
 (0)