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
-[Twitter - Don't use Redux until...](https://twitter.com/dan_abramov/status/699241546248536064)
24
24
-[The Case for Flux](https://medium.com/swlh/the-case-for-flux-379b7d1982c6)
25
-
-[SO - Why use Redux over Facebook Flux?](http://stackoverflow.com/questions/32461229/why-use-redux-over-facebook-flux)
26
-
-[SO - Why should I use Redux in this example?](http://stackoverflow.com/questions/35675339/why-should-i-use-redux-in-this-example)
27
-
-[SO - What could be the downsides of using Redux instead of Flux?](http://stackoverflow.com/questions/32021763/what-could-be-the-downsides-of-using-redux-instead-of-flux)
25
+
-[Stack Overflow - Why use Redux over Facebook Flux?](http://stackoverflow.com/questions/32461229/why-use-redux-over-facebook-flux)
26
+
-[Stack Overflow - Why should I use Redux in this example?](http://stackoverflow.com/questions/35675339/why-should-i-use-redux-in-this-example)
27
+
-[Stack Overflow - What could be the downsides of using Redux instead of Flux?](http://stackoverflow.com/questions/32021763/what-could-be-the-downsides-of-using-redux-instead-of-flux)
28
28
29
29
### Can Redux only be used with React?
30
30
@@ -61,8 +61,8 @@ In general, remember that reducers are just functions - you can organize them an
61
61
**Discussions**:
62
62
-[#601 - A concern on combineReducers, when an action is related to multiple reducers](https://github.com/reactjs/redux/issues/601)
63
63
-[#1400 - Is passing top-level state object to branch reducer an anti-pattern?](https://github.com/reactjs/redux/issues/1400)
64
-
-[SO - Accessing other parts of the state when using combined reducers?](http://stackoverflow.com/questions/34333979/accessing-other-parts-of-the-state-when-using-combined-reducers)
65
-
-[SO - Reducing an entire subtree with redux combineReducers](http://stackoverflow.com/questions/34427851/reducing-an-entire-subtree-with-redux-combinereducers)
64
+
-[Stack Overflow - Accessing other parts of the state when using combined reducers?](http://stackoverflow.com/questions/34333979/accessing-other-parts-of-the-state-when-using-combined-reducers)
65
+
-[Stack Overflow - Reducing an entire subtree with redux combineReducers](http://stackoverflow.com/questions/34427851/reducing-an-entire-subtree-with-redux-combinereducers)
66
66
-[Sharing State Between Redux Reducers](https://invalidpatent.wordpress.com/2016/02/18/sharing-state-between-redux-reducers/)
67
67
68
68
@@ -93,8 +93,8 @@ There are a number of community packages that implement various approaches for s
93
93
-[#1098 - Using Redux in reusable React component](https://github.com/reactjs/redux/issues/1098)
94
94
-[#1287 - How to choose between Redux's store and React's state?](https://github.com/reactjs/redux/issues/1287)
95
95
-[#1385 - What are the disadvantages of storing all your state in a single immutable atom?](https://github.com/reactjs/redux/issues/1385)
96
-
-[SO - Why is state all in one place, even state that isn't global?](http://stackoverflow.com/questions/35664594/redux-why-is-state-all-in-one-place-even-state-that-isnt-global)
97
-
-[SO - Should all component state be kept in Redux store?](http://stackoverflow.com/questions/35328056/react-redux-should-all-component-states-be-kept-in-redux-store)
96
+
-[Stack Overflow - Why is state all in one place, even state that isn't global?](http://stackoverflow.com/questions/35664594/redux-why-is-state-all-in-one-place-even-state-that-isnt-global)
97
+
-[Stack Overflow - Should all component state be kept in Redux store?](http://stackoverflow.com/questions/35328056/react-redux-should-all-component-states-be-kept-in-redux-store)
98
98
99
99
100
100
### Can I put functions, promises, or other non-serializable items in my store state?
@@ -148,8 +148,8 @@ Similarly, while you _can_ reference your store instance by importing it directl
148
148
149
149
**Discussions**:
150
150
-[#1346 - Is it bad practice to just have a 'stores' directory?](https://github.com/reactjs/redux/issues/1436)
-[Stack Overflow - Accessing Redux state in an action creator](http://stackoverflow.com/questions/35667249/accessing-redux-state-in-an-action-creator)
153
153
154
154
155
155
### Is it OK to have more than one middleware chain in my store enhancer? What is the difference between "next" and "dispatch" in a middleware function?
@@ -208,8 +208,8 @@ Encapsulating and centralizing commonly used pieces of code is a key concept in
208
208
-[#628 - Solution for simple action creation with less boilerplate](https://github.com/reactjs/redux/issues/628)
-[#1167 - Reducer without switch](https://github.com/reactjs/redux/issues/1167)
211
-
-[SO - Why do you need 'Actions' as data in Redux?](http://stackoverflow.com/q/34759047/62937)
212
-
-[SO - What is the point of the constants in Redux?](http://stackoverflow.com/q/34965856/62937)
211
+
-[Stack Overflow - Why do you need 'Actions' as data in Redux?](http://stackoverflow.com/q/34759047/62937)
212
+
-[Stack Overflow - What is the point of the constants in Redux?](http://stackoverflow.com/q/34965856/62937)
213
213
214
214
215
215
### Is there always a 1-1 mapping between reducers and actions?
@@ -225,7 +225,7 @@ The actual suggested pattern is to have independent sub-reducer functions that a
225
225
-[Twitter - most common Redux misconception](https://twitter.com/dan_abramov/status/682923564006248448)
226
226
-[#1167 - Reducer without switch](https://github.com/reactjs/redux/issues/1167)
227
227
-[Reduxible #8 - Reducers and action creators aren't a one-to-one mapping](https://github.com/reduxible/reduxible/issues/8)
228
-
-[SO - Can I dispatch multiple actions without Redux Thunk middleware?](http://stackoverflow.com/questions/35493352/can-i-dispatch-multiple-actions-without-redux-thunk-middleware/35642783)
228
+
-[Stack Overflow - Can I dispatch multiple actions without Redux Thunk middleware?](http://stackoverflow.com/questions/35493352/can-i-dispatch-multiple-actions-without-redux-thunk-middleware/35642783)
229
229
230
230
### How can I represent "side effects" such as AJAX calls? Why do we need things like "action creators", "thunks", and "middleware" to do async behavior?
231
231
@@ -252,12 +252,12 @@ The simplest and most common way to do this is adding the [redux-thunk](https://
252
252
-[#533 - Simpler introduction to async action creators](https://github.com/reactjs/redux/issues/533)
253
253
-[#569 - Proposal: API for explicit side effects](https://github.com/reactjs/redux/pull/569)
254
254
-[#1139 - An alternative side effect model based on generators and sagas](https://github.com/reactjs/redux/issues/1139)
255
-
-[SO - Why do we need middleware for async flow in Redux?](http://stackoverflow.com/questions/34570758/why-do-we-need-middleware-for-async-flow-in-redux)
256
-
-[SO - How to dispatch a Redux action with a timeout?](http://stackoverflow.com/questions/35411423/how-to-dispatch-a-redux-action-with-a-timeout/35415559)
257
-
-[SO - Where should I put synchronous side effects linked to actions in redux?](http://stackoverflow.com/questions/32982237/where-should-i-put-synchronous-side-effects-linked-to-actions-in-redux/33036344)
258
-
-[SO - How to handle complex side-effects in Redux?](http://stackoverflow.com/questions/32925837/how-to-handle-complex-side-effects-in-redux/33036594)
259
-
-[SO - How to unit test async Redux actions to mock ajax response](http://stackoverflow.com/questions/33011729/how-to-unit-test-async-redux-actions-to-mock-ajax-response/33053465)
260
-
-[SO - How to fire AJAX calls in response to the state changes with Redux?](http://stackoverflow.com/questions/35262692/how-to-fire-ajax-calls-in-response-to-the-state-changes-with-redux/35675447)
255
+
-[Stack Overflow - Why do we need middleware for async flow in Redux?](http://stackoverflow.com/questions/34570758/why-do-we-need-middleware-for-async-flow-in-redux)
256
+
-[Stack Overflow - How to dispatch a Redux action with a timeout?](http://stackoverflow.com/questions/35411423/how-to-dispatch-a-redux-action-with-a-timeout/35415559)
257
+
-[Stack Overflow - Where should I put synchronous side effects linked to actions in redux?](http://stackoverflow.com/questions/32982237/where-should-i-put-synchronous-side-effects-linked-to-actions-in-redux/33036344)
258
+
-[Stack Overflow - How to handle complex side-effects in Redux?](http://stackoverflow.com/questions/32925837/how-to-handle-complex-side-effects-in-redux/33036594)
259
+
-[Stack Overflow - How to unit test async Redux actions to mock ajax response](http://stackoverflow.com/questions/33011729/how-to-unit-test-async-redux-actions-to-mock-ajax-response/33053465)
260
+
-[Stack Overflow - How to fire AJAX calls in response to the state changes with Redux?](http://stackoverflow.com/questions/35262692/how-to-fire-ajax-calls-in-response-to-the-state-changes-with-redux/35675447)
261
261
-[Reddit - Help performing Async API calls with Redux-Promise Middleware.](https://www.reddit.com/r/reactjs/comments/469iyc/help_performing_async_api_calls_with_reduxpromise/)
262
262
-[Twitter - possible comparison between sagas, loops, and other approaches](https://twitter.com/dan_abramov/status/689639582120415232)
263
263
-[Redux Side-Effects and You](https://medium.com/@fward/redux-side-effects-and-you-66f2e0842fc3)
@@ -274,9 +274,9 @@ In general, ask if these actions are related but independent, or might actually
274
274
**Discussions**:
275
275
-[#597 - Valid to dispatch multiple actions from an event handler?](https://github.com/reactjs/redux/issues/597)
276
276
-[#959 - Multiple actions one dispatch?](https://github.com/reactjs/redux/issues/959)
277
-
-[SO - Should I use one or several action types to represent this async action?](http://stackoverflow.com/questions/33637740/should-i-use-one-or-several-action-types-to-represent-this-async-action/33816695)
278
-
-[SO - Do events and actions have a 1:1 relationship in Redux?](http://stackoverflow.com/questions/35406707/do-events-and-actions-have-a-11-relationship-in-redux/35410524)
279
-
-[SO - Should actions be handled by reducers to related actions or generated by action creators themselves?](http://stackoverflow.com/questions/33220776/should-actions-like-showing-hiding-loading-screens-be-handled-by-reducers-to-rel/33226443#33226443)
277
+
-[Stack Overflow - Should I use one or several action types to represent this async action?](http://stackoverflow.com/questions/33637740/should-i-use-one-or-several-action-types-to-represent-this-async-action/33816695)
278
+
-[Stack Overflow - Do events and actions have a 1:1 relationship in Redux?](http://stackoverflow.com/questions/35406707/do-events-and-actions-have-a-11-relationship-in-redux/35410524)
279
+
-[Stack Overflow - Should actions be handled by reducers to related actions or generated by action creators themselves?](http://stackoverflow.com/questions/33220776/should-actions-like-showing-hiding-loading-screens-be-handled-by-reducers-to-rel/33226443#33226443)
280
280
281
281
282
282
## Code Structure
@@ -296,7 +296,7 @@ It's generally suggested that selectors should be defined alongside reducers and
-[SO - How to structure Redux components/containers](http://stackoverflow.com/questions/32634320/how-to-structure-redux-components-containers/32921576)
299
+
-[Stack Overflow - How to structure Redux components/containers](http://stackoverflow.com/questions/32634320/how-to-structure-redux-components-containers/32921576)
300
300
-[Redux Best Practices](https://medium.com/lexical-labs-engineering/redux-best-practices-64d59775802e)
301
301
-[Rules For Structuring (Redux) Applications ](http://jaysoo.ca/2016/02/28/organizing-redux-application/)
302
302
@@ -314,7 +314,7 @@ This comment sums up the dichotomy nicely:
314
314
**Discussions**:
315
315
-[#1165 - Where to put business logic / validation?](https://github.com/reactjs/redux/issues/1165)
316
316
-[#1171 - Recommendations for best practices regarding action-creators, reducers, and selectors](https://github.com/reactjs/redux/issues/1171)
317
-
-[SO - Accessing Redux state in an action creator??](http://stackoverflow.com/questions/35667249/accessing-redux-state-in-an-action-creator/35674575)
317
+
-[Stack Overflow - Accessing Redux state in an action creator??](http://stackoverflow.com/questions/35667249/accessing-redux-state-in-an-action-creator/35674575)
318
318
319
319
320
320
## Performance
@@ -352,8 +352,8 @@ If you actually are concerned about reducer performance, you can use a utility s
-[#1303 - Redux Performance with Large Store and frequent updates](https://github.com/reactjs/redux/issues/1303)
355
-
-[SO - State in Redux app has the name of the reducer](http://stackoverflow.com/questions/35667775/state-in-redux-react-app-has-a-property-with-the-name-of-the-reducer/35674297)
356
-
-[SO - How does Redux deal with deeply nested models?](http://stackoverflow.com/questions/34494866/how-does-redux-deals-with-deeply-nested-models/34495397)
355
+
-[Stack Overflow - State in Redux app has the name of the reducer](http://stackoverflow.com/questions/35667775/state-in-redux-react-app-has-a-property-with-the-name-of-the-reducer/35674297)
356
+
-[Stack Overflow - How does Redux deal with deeply nested models?](http://stackoverflow.com/questions/34494866/how-does-redux-deals-with-deeply-nested-models/34495397)
357
357
358
358
359
359
### Do I have to deep-copy my state in a reducer? Isn't copying my state going to be slow?
@@ -396,7 +396,7 @@ Redux does not store a history of actions itself. However, the Redux DevTools d
396
396
397
397
398
398
**Discussions**:
399
-
-[SO - Is there any way to "commit" the state in Redux to free memory?](http://stackoverflow.com/questions/35627553/is-there-any-way-to-commit-the-state-in-redux-to-free-memory/35634004)
399
+
-[Stack Overflow - Is there any way to "commit" the state in Redux to free memory?](http://stackoverflow.com/questions/35627553/is-there-any-way-to-commit-the-state-in-redux-to-free-memory/35634004)
400
400
-[Reddit - What's the best place to keep initial state?](https://www.reddit.com/r/reactjs/comments/47m9h5/whats_the_best_place_to_keep_the_initial_state/)
401
401
402
402
@@ -427,7 +427,7 @@ Note that "updating data immutably" does _not_ mean that you must use the Immuta
427
427
-[#1262 - Immutable data + bad performance](https://github.com/reactjs/redux/issues/1262)
428
428
-[React-Redux #235 - Predicate function for updating component](https://github.com/reactjs/react-redux/issues/235)
429
429
-[React-Redux #291 - Should mapStateToProps be called every time an action is dispatched?](https://github.com/reactjs/react-redux/issues/291)
430
-
-[SO - Cleaner/shorter way to update nested state in Redux?](http://stackoverflow.com/questions/35592078/cleaner-shorter-way-to-update-nested-state-in-redux)
430
+
-[Stack Overflow - Cleaner/shorter way to update nested state in Redux?](http://stackoverflow.com/questions/35592078/cleaner-shorter-way-to-update-nested-state-in-redux)
431
431
-[Gist - state mutations](https://gist.github.com/amcdnl/7d93c0c67a9a44fe5761#gistcomment-1706579)
432
432
-[Pros and Cons of Using Immutability with React](http://reactkungfu.com/2015/08/pros-and-cons-of-using-immutability-with-react-js/)
433
433
@@ -454,7 +454,7 @@ For non-connected components, you may want to check what props are being passed
454
454
#### Further information
455
455
456
456
**Discussions**:
457
-
-[SO - Can a React-Redux app scale as well as Backbone?](http://stackoverflow.com/questions/34782249/can-a-react-redux-app-really-scale-as-well-as-say-backbone-even-with-reselect)
457
+
-[Stack Overflow - Can a React-Redux app scale as well as Backbone?](http://stackoverflow.com/questions/34782249/can-a-react-redux-app-really-scale-as-well-as-say-backbone-even-with-reselect)
458
458
-[React.js pure render performance anti-pattern](https://medium.com/@esamatti/react-js-pure-render-performance-anti-pattern-fb88c101332f)
459
459
460
460
@@ -487,7 +487,7 @@ If you do not provide your own `mapDispatchToProps` function when calling `conne
487
487
-[React-Redux #89 - can i wrap multi actionCreators into one props with name?](https://github.com/reactjs/react-redux/issues/89)
488
488
-[React-Redux #145 - consider always passing down dispatch regardless of what mapDispatchToProps does](https://github.com/reactjs/react-redux/issues/145)
489
489
-[React-Redux #255 - this.props.dispatch is undefined if using mapDispatchToProps](https://github.com/reactjs/react-redux/issues/255)
490
-
-[SO - http://stackoverflow.com/questions/34458261/how-to-get-simple-dispatch-from-this-props-using-connect-w-redux/34458710](How to get simple dispatch from this.props using connect w/ Redux?)
490
+
-[Stack Overflow - http://stackoverflow.com/questions/34458261/how-to-get-simple-dispatch-from-this-props-using-connect-w-redux/34458710](How to get simple dispatch from this.props using connect w/ Redux?)
491
491
492
492
493
493
### Should I only connect my top component, or can I connect multiple components in my tree?
@@ -511,15 +511,15 @@ In general, try to find a balance between understandable data flow and areas of
511
511
-[#419 - Recommended usage of connect](https://github.com/reactjs/redux/issues/419)
512
512
-[#756 - container vs component?](https://github.com/reactjs/redux/issues/756)
513
513
-[#1176 - Redux+React with only stateless components](https://github.com/reactjs/redux/issues/1176)
514
-
-[SO - can a dumb component use a Redux container?](http://stackoverflow.com/questions/34992247/can-a-dumb-component-use-render-redux-container-component)
514
+
-[Stack Overflow - can a dumb component use a Redux container?](http://stackoverflow.com/questions/34992247/can-a-dumb-component-use-render-redux-container-component)
515
515
516
516
517
517
518
518
## Miscellaneous
519
519
520
520
### Are there any larger, "real" Redux projects?
521
521
522
-
The Redux "examples" folder has several sample projects of varying complexity, including a "real-world" example. While many companies are using Redux, most of their applications are proprietary and not available. A large number of Redux-related projects can be found on Github, such as [Sound-Redux](https://github.com/andrewngu/sound-redux).
522
+
The Redux "examples" folder has several sample projects of varying complexity, including a "real-world" example. While many companies are using Redux, most of their applications are proprietary and not available. A large number of Redux-related projects can be found on Github, such as [Stack Overflowund-Redux](https://github.com/andrewngu/sound-redux).
0 commit comments