Description
Summary
I did the initial grunt work of writing the FAQ. @gaearon did some editing, I added the TOC and the short question links, and it's been a great resource so far. Since then, I know @gaearon has pointed to a number of discussions and articles as being FAQ worthy, and I have a bunch of backlogged bookmarks and updates I need to sort through. Let's try to list any topics, links, or items we feel need to be added or updated.
Update
I added the updates to existing questions, but am currently focused on other tasks. If anyone is interested in helping write the "new" entries, I'd be happy to work with them regarding info, content, and editing!
Waiting to be Added
New topics
General
- When should I learn Redux?
- What are pros and cons of using Redux?
- How does Redux compare to [Backbone, Angular, MobX]?
- Redux vs a global variable
Code Structure
- Reusable / encapsulated logic/modules?
- https://github.com/markerikson/redux-ecosystem-links/blob/master/component-state.md
- https://github.com/markerikson/react-redux-links/blob/master/redux-techniques.md#encapsulation-and-reusability
- http://randycoulman.com/blog/
- https://github.com/slorber/scalable-frontend-with-elm-or-redux
- http://www.webpackbin.com/VkHniHP6b
- Where should websockets and other persistent connections live?
- In middleware. See existing examples at https://github.com/markerikson/redux-ecosystem-links/blob/master/middleware-sockets-adapters.md
Performance
- Pagination/caching?
- http://stackoverflow.com/questions/33940015/how-to-choose-the-redux-state-shape-for-an-app-with-list-detail-views-and-pagina
- Cache API: invalidation, expiration, refresh, clean, TTL, LRU... facebook/relay#720 (comment)
- https://twitter.com/acemarke/status/804071531844423683
- https://medium.com/@dcousineau/advanced-redux-entity-normalization-f5f1fe2aefc5
- Related to existing "state tree size" question
Design Decisions
- Why does Redux separate out actions and updates? Why not just update state directly?
React-Redux
- Why use React-Redux?
Other
- Fit these diagrams in somewhere? Docs need one or more diagrams #653
- "FAQ-worthy" mentions:
- Boilerplate/verbosity:
Updates to Existing Questions
- When should I use Redux?
- Where should I put "business logic" ?
It's not an FAQ item, but I'll leave a note for myself here rather than filing a new issue. The "Beyond combineReducers" page should have a mention of "double-nesting state", as in state.posts.posts
, usually due to initial state defining a key and the slice reducer being given a key. . Definitely a common mistake.
Completed
New Topics
Immutability
- Do I have to use Immutable.js?
- https://www.reddit.com/r/javascript/comments/4rcqpx/dan_abramov_redux_is_not_an_architecture_or/d51g4k4?context=3
- https://github.com/markerikson/react-redux-links/blob/master/immutable-data.md#immutability-and-react
- https://github.com/markerikson/react-redux-links/blob/master/react-performance.md#immutable-data
- Why should data be handled immutably?
Updates to existing questions
-
When/why to use Redux?
- https://twitter.com/dan_abramov/status/733742952657342464
- https://twitter.com/dan_abramov/status/732912085840089088
- https://twitter.com/dan_abramov/status/725089243836588032
- https://twitter.com/dan_abramov/status/737036433215610880
- http://stackoverflow.com/questions/36631761/when-should-i-add-redux-to-a-react-app
- https://medium.com/@dan_abramov/you-might-not-need-redux-be46360cf367#.8qxj336yv
- http://stackoverflow.com/questions/39260769/redux-vs-plain-react/39261546#39261546
- https://twitter.com/dan_abramov/status/802564042648944642
- https://www.reddit.com/r/reactjs/comments/5exfea/feedback_on_my_first_redux_app/dagglqp/
- http://stackoverflow.com/questions/39260769/redux-vs-plain-react/39261546#39261546
- https://twitter.com/acemarke/status/793862722253447168
- https://twitter.com/dan_abramov/status/801489026687651840
-
Redux state vs React state:
- https://discuss.reactjs.org/t/redux-and-global-state-vs-local-state/4187/8
- http://stackoverflow.com/questions/35328056/react-redux-should-all-component-states-be-kept-in-redux-store/35328862#35328862
- https://www.reddit.com/r/reactjs/comments/4w04to/when_using_redux_should_all_asynchronous_actions/d63u4o8
- https://twitter.com/dan_abramov/status/749710501916139520
- https://twitter.com/dan_abramov/status/736310245945933824
-
Serializable store data:
-
Nested data:
- Treeview example: Add tree view example #1269
- http://stackoverflow.com/questions/32798193/how-to-handle-tree-shaped-entities-in-redux-reducers
- Normalising state and garbage collection #1824
- http://stackoverflow.com/questions/38012852/users-sees-one-part-of-deeply-nested-state-should-visible-properties-be-at-top/38017227#38017227
- https://medium.com/@adamrackis/querying-a-redux-store-37db8c7f3b0f
-
Actions:
- some of the links mentioned in Simpler introduction to async action creators #533 ?
- Batched actions: https://github.com/manaflair/redux-batch
-
File structure:
-
Scaling:
- http://stackoverflow.com/questions/34782249/can-a-react-redux-app-really-scale-as-well-as-say-backbone-even-with-reselect
- Completely rewrite connect() to offer advanced API, separate concerns, and (probably) resolve a lot of those pesky edge cases react-redux#407
- Rewrite connect() for better performance and extensibility react-redux#416
- http://stackoverflow.com/questions/37264415/how-to-optimize-small-updates-to-props-of-nested-component-in-react-redux
- http://somebody32.github.io/high-performance-redux/
- connect could be used with a custom store.subscribe method provided as option react-redux#269
- Performance issues with large collections #1751
- https://twitter.com/dan_abramov/status/720219615041859584
-
Multiple re-renders:
-
Where does business logic live?
- Recommend that Action constants be named in the past tense #384 (comment) (the more that's in the reducers, the more you can edit and replay via time-travel)
- http://blog.isquaredsoftware.com/2017/05/idiomatic-redux-tao-of-redux-part-2/#thick-and-thin-reducers
-
Multiple dispatches
-
Why doesn't Redux pass the state to subscribers?
- Is it possible to get action and state in store.subscribe? #580 and many, many more
- Alternate Proof of Concept: Enhancer Overhaul #2214 (breaks debouncing)
- Currently partly answered in "Store Setup". Will have to decide where this goes.
-
Why doesn't Redux use classes for actions and reducers?
-
Why does the middleware signature use currying?
-
Why does
applyMiddleware
use a closure fordispatch
? -
combineReducers
recursion / limitations? -
Why doesn't
mapDispatch
allow use ofgetState
ormapState
return values? -
Will having "one state tree" cause memory problems?
- https://stackoverflow.com/questions/39943762/can-a-redux-store-lead-to-a-memory-leak/40549594#40549594
- https://stackoverflow.com/questions/42489557/redux-and-all-the-application-state/42491766#42491766
- https://stackoverflow.com/questions/44956071/memory-usage-concern-with-controlled-components?noredirect=1&lq=1
-
Why use action creators?