Skip to content

Commit 46c62b3

Browse files
authored
Merge pull request #2586 from maxhallinan/faq_learn_redux_when
Update FAQ: When should I learn Redux?
2 parents b0be6d2 + 0f176a6 commit 46c62b3

File tree

1 file changed

+31
-7
lines changed

1 file changed

+31
-7
lines changed

docs/faq/General.md

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,43 @@
22

33
## Table of Contents
44

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)
89

910

1011
## General
1112

13+
<a id="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+
1236
<a id="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.
1440

15-
Pete Hunt, one of the early contributors to React, says:
41+
As Pete Hunt, one of the early contributors to React, says:
1642

1743
> You'll know when you need Flux. If you aren't sure if you need it, you don't need it.
1844
@@ -24,8 +50,6 @@ In general, use Redux when you have reasonable amounts of data changing over tim
2450

2551
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).
2652

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-
2953
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.
3054

3155
#### Further information

0 commit comments

Comments
 (0)