You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/introduction/GettingStarted.md
+8-15
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,11 @@ You can use Redux together with [React](https://reactjs.org), or with any other
18
18
Redux is available as a package on NPM for use with a module bundler or in a Node application:
19
19
20
20
```bash
21
+
# NPM
21
22
npm install --save redux
23
+
24
+
# Yarn
25
+
yarn add redux
22
26
```
23
27
24
28
It is also available as a precompiled UMD package that defines a `window.Redux` global variable. The UMD package can be used as a [`<script>` tag](https://unpkg.com/redux/dist/redux.js) directly.
@@ -27,11 +31,11 @@ For more details, see the [Installation](Installation.md) page.
27
31
28
32
## Redux Toolkit
29
33
30
-
Redux itself is small and unopinionated. We also have a separate package called **[Redux Toolkit](https://redux-toolkit.js.org/)**,
34
+
Redux itself is small and unopinionated. We also have a separate addon package called **[Redux Toolkit](https://redux-toolkit.js.org/)**,
31
35
which includes some opinionated defaults that help you use Redux more effectively. It's our official recommended approach
32
36
for writing Redux logic.
33
37
34
-
RTK includes utilities that help simplify a lot of common use cases, including [store setup](https://redux-toolkit.js.org/api/configureStore),
38
+
RTK includes utilities that help simplify many common use cases, including [store setup](https://redux-toolkit.js.org/api/configureStore),
35
39
[creating reducers and writing immutable update logic](https://redux-toolkit.js.org/api/createreducer),
36
40
and even [creating entire "slices" of state at once](https://redux-toolkit-kit.js.org/api/createslice).
37
41
@@ -99,20 +103,11 @@ In a typical Redux app, there is just a single store with a single root reducing
99
103
100
104
This architecture might seem like an overkill for a counter app, but the beauty of this pattern is how well it scales to large and complex apps. It also enables very powerful developer tools, because it is possible to trace every mutation to the action that caused it. You can record user sessions and reproduce them just by replaying every action.
101
105
102
-
## Examples
106
+
## Example Projects
103
107
104
108
The Redux repository contains several example projects demonstrating various aspects of how to use Redux. Almost all examples have a corresponding CodeSandbox sandbox. This is an interactive version of the code that you can play with online.
See the complete list of examples in the **[Examples page](./Examples.md)**.
116
111
117
112
## Learn Redux
118
113
@@ -168,8 +163,6 @@ Here are some suggestions on when it makes sense to use Redux:
168
163
- You need a single source of truth for your state
169
164
- You find that keeping all your state in a top-level component is no longer sufficient
170
165
171
-
Yes, these guidelines are subjective and vague, but this is for good reason. The point at which you should integrate Redux into your application is different for every user and different for every application.
172
-
173
166
> **For more thoughts on how Redux is meant to be used, see:**<br>
174
167
>
175
168
> -**[Redux FAQ: When should I use Redux?](../faq/General.md#when-should-i-use-redux)**
0 commit comments