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/faq/General.md
+31-7Lines changed: 31 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,43 @@
2
2
3
3
## Table of Contents
4
4
5
-
-[When should I use Redux?](#general-when-to-use)
6
-
-[Can Redux only be used with React?](#general-only-react)
7
-
-[Do I need to have a particular build tool to use Redux?](#general-build-tools)
5
+
-[When should I learn Redux?](#general-when-to-learn)
6
+
-[When should I use Redux?](#general-when-to-use)
7
+
-[Can Redux only be used with React?](#general-only-react)
8
+
-[Do I need to have a particular build tool to use Redux?](#general-build-tools)
8
9
9
10
10
11
## General
11
12
13
+
<aid="general-when-to-learn"></a>
14
+
### When should I learn Redux?
15
+
16
+
What to learn can be an overwhelming question for a JavaScript developer. It helps to narrow the range of options by learning one thing at a time and focusing on problems you find in your work. Redux is a pattern for managing application state. If you do not have problems with state management, you might find the benefits of Redux harder to understand. Some UI libraries (like React) have their own state management system. If you are using one of these libraries, especially if you are just learning to use them, we encourage you to learn the capabilities of that built-in system first. It might be all you need to build your application. If your application becomes so complex that you are confused about where state is stored or how state changes, then it is a good time to learn Redux. Experiencing the complexity that Redux seeks to abstract is the best preparation for effectively applying that abstraction to your work.
17
+
18
+
#### Further information
19
+
20
+
**Articles**
21
+
22
+
-[Deciding What Not To Learn](http://gedd.ski/post/what-not-to-learn/)
23
+
-[How to learn web frameworks](https://ux.shopify.com/how-to-learn-web-frameworks-9d447cb71e68)
24
+
-[Redux vs MobX vs Flux vs... Do you even need that?](https://goshakkk.name/redux-vs-mobx-vs-flux-etoomanychoices/)
25
+
26
+
**Discussions**
27
+
28
+
-[Ask HN: Overwhelmed with learning front-end, how do I proceed?](https://news.ycombinator.com/item?id=12882816)
29
+
-[Twitter: If you want to teach someone to use an abstraction...](https://twitter.com/acemarke/status/901329101088215044)
30
+
-[Twitter: it was never intended to be learned before...](https://twitter.com/dan_abramov/status/739961787295117312)
31
+
-[Twitter: Learning Redux before React?](https://twitter.com/dan_abramov/status/739962098030137344)
32
+
-[Twitter: The first time I used React, people told me I needed Redux...](https://twitter.com/raquelxmoss/status/901576285020856320)
33
+
-[Twitter: This was my experience with Redux...](https://twitter.com/garetmckinley/status/901500556568645634)
34
+
35
+
12
36
<aid="general-when-to-use"></a>
13
-
### When should I use Redux?
37
+
### When should I use Redux?
38
+
39
+
The need to use Redux should not be taken for granted.
14
40
15
-
Pete Hunt, one of the early contributors to React, says:
41
+
As Pete Hunt, one of the early contributors to React, says:
16
42
17
43
> You'll know when you need Flux. If you aren't sure if you need it, you don't need it.
18
44
@@ -24,8 +50,6 @@ In general, use Redux when you have reasonable amounts of data changing over tim
24
50
25
51
However, it's also important to understand that using Redux comes with tradeoffs. It's not designed to be the shortest or fastest way to write code. It's intended to help answer the question "When did a certain slice of state change, and where did the data come from?", with predictable behavior. It does so by asking you to follow specific constraints in your application: store your application's state as plain data, describe changes as plain objects, and handle those changes with pure functions that apply updates immutably. This is often the source of complaints about "boilerplate". These constraints require effort on the part of a developer, but also open up a number of additional possibilities (such as store persistence and synchronization).
26
52
27
-
If you're just learning React, you should probably focus on thinking in React first, then look at Redux once you better understand React and how Redux might fit into your application.
28
-
29
53
In the end, Redux is just a tool. It's a great tool, and there's some great reasons to use it, but there's also reasons you might not want to use it. Make informed decisions about your tools, and understand the tradeoffs involved in each decision.
0 commit comments