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/Actions.md
+2-19Lines changed: 2 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,24 +4,7 @@ title: Actions
4
4
sidebar_label: Actions
5
5
---
6
6
7
-
# Redux FAQ: Actions
8
-
9
-
## Table of Contents
10
-
11
-
-[Redux FAQ: Actions](#redux-faq-actions)
12
-
-[Table of Contents](#table-of-contents)
13
-
-[Actions](#actions)
14
-
-[Why should `type` be a string, or at least serializable? Why should my action types be constants?](#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)
15
-
-[Further information](#further-information)
16
-
-[Is there always a one-to-one mapping between reducers and actions?](#is-there-always-a-one-to-one-mapping-between-reducers-and-actions)
17
-
-[Further information](#further-information-1)
18
-
-[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?](#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)
19
-
-[Further information](#further-information-2)
20
-
-[What async middleware should I use? How do you decide between thunks, sagas, observables, or something else?](#what-async-middleware-should-i-use-how-do-you-decide-between-thunks-sagas-observables-or-something-else)
21
-
-[Should I dispatch multiple actions in a row from one action creator?](#should-i-dispatch-multiple-actions-in-a-row-from-one-action-creator)
22
-
-[Further information](#further-information-3)
23
-
24
-
## Actions
7
+
## Redux FAQ: Actions
25
8
26
9
### Why should `type` be a string? Why should my action types be constants?
27
10
@@ -145,7 +128,7 @@ Try to avoid dispatching several times synchronously in a row in the places wher
Copy file name to clipboardExpand all lines: docs/faq/CodeStructure.md
+1-9Lines changed: 1 addition & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,15 +6,7 @@ sidebar_label: Code Structure
6
6
7
7
import { DetailedExplanation } from '../components/DetailedExplanation'
8
8
9
-
# Redux FAQ: Code Structure
10
-
11
-
## Table of Contents
12
-
13
-
-[What should my file structure look like? How should I group my action creators and reducers in my project? Where should my selectors go?](#what-should-my-file-structure-look-like-how-should-i-group-my-action-creators-and-reducers-in-my-project-where-should-my-selectors-go)
14
-
-[How should I split my logic between reducers and action creators? Where should my “business logic” go?](#how-should-i-split-my-logic-between-reducers-and-action-creators-where-should-my-business-logic-go)
15
-
-[Why should I use action creators?](#why-should-i-use-action-creators)
16
-
-[Where should websockets and other persistent connections live?](#where-should-websockets-and-other-persistent-connections-live)
17
-
-[How can I use the Redux store in non-component files?](#how-can-i-use-the-redux-store-in-non-component-files)
9
+
## Redux FAQ: Code Structure
18
10
19
11
## What should my file structure look like? How should I group my action creators and reducers in my project? Where should my selectors go?
Copy file name to clipboardExpand all lines: docs/faq/DesignDecisions.md
+1-12Lines changed: 1 addition & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,18 +4,7 @@ title: Design Decisions
4
4
sidebar_label: Design Decisions
5
5
---
6
6
7
-
# Redux FAQ: Design Decisions
8
-
9
-
## Table of Contents
10
-
11
-
-[Why doesn't Redux pass the state and action to subscribers?](#why-doesnt-redux-pass-the-state-and-action-to-subscribers)
12
-
-[Why doesn't Redux support using classes for actions and reducers?](#why-doesnt-redux-support-using-classes-for-actions-and-reducers)
13
-
-[Why does the middleware signature use currying?](#why-does-the-middleware-signature-use-currying)
14
-
-[Why does applyMiddleware use a closure for dispatch?](#why-does-applymiddleware-use-a-closure-for-dispatch)
15
-
-[Why doesn't `combineReducers` include a third argument with the entire state when it calls each reducer?](#why-doesnt-combinereducers-include-a-third-argument-with-the-entire-state-when-it-calls-each-reducer)
16
-
-[Why doesn't mapDispatchToProps allow use of return values from `getState()` or `mapStateToProps()`?](#why-doesnt-mapdispatchtoprops-allow-use-of-return-values-from-getstate-or-mapstatetoprops)
17
-
18
-
## Design Decisions
7
+
## Redux FAQ: Design Decisions
19
8
20
9
### Why doesn't Redux pass the state and action to subscribers?
Copy file name to clipboardExpand all lines: docs/faq/ImmutableData.md
+1-21Lines changed: 1 addition & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,27 +4,7 @@ title: Immutable Data
4
4
sidebar_label: Immutable Data
5
5
---
6
6
7
-
# Redux FAQ: Immutable Data
8
-
9
-
## Table of Contents
10
-
11
-
-[What are the benefits of immutability?](#what-are-the-benefits-of-immutability)
12
-
-[Why is immutability required by Redux?](#why-is-immutability-required-by-redux)
13
-
-[Why does Redux’s use of shallow equality checking require immutability?](#why-does-reduxs-use-of-shallow-equality-checking-require-immutability)
14
-
-[How do Shallow and Deep Equality Checking differ?](#how-do-shallow-and-deep-equality-checking-differ)
15
-
-[How does Redux use shallow equality checking?](#how-does-redux-use-shallow-equality-checking)
16
-
-[How does `combineReducers` use shallow equality checking?](#how-does-combinereducers-use-shallow-equality-checking)
17
-
-[How does React-Redux use shallow equality checking?](#how-does-react-redux-use-shallow-equality-checking)
18
-
-[How does React-Redux use shallow equality checking to determine whether a component needs re-rendering?](#how-does-react-redux-use-shallow-equality-checking-to-determine-whether-a-component-needs-re-rendering)
19
-
-[Why will shallow equality checking not work with mutable objects?](#why-will-shallow-equality-checking-not-work-with-mutable-objects)
20
-
-[Does shallow equality checking with a mutable object cause problems with Redux?](#does-shallow-equality-checking-with-a-mutable-object-cause-problems-with-redux)
21
-
-[Why does a reducer mutating the state prevent React-Redux from re-rendering a wrapped component?](#why-does-a-reducer-mutating-the-state-prevent-react-redux-from-re-rendering-a-wrapped-component)
22
-
-[Why does a selector mutating and returning a persistent object to `mapStateToProps` prevent React-Redux from re-rendering a wrapped component?](#why-does-a-selector-mutating-and-returning-a-persistent-object-to-mapstatetoprops-prevent-react-redux-from-re-rendering-a-wrapped-component)
23
-
-[How does immutability enable a shallow check to detect object mutations?](#how-does-immutability-enable-a-shallow-check-to-detect-object-mutations)
24
-
-[How can immutability in your reducers cause components to render unnecessarily?](#how-can-immutability-in-your-reducers-cause-components-to-render-unnecessarily)
25
-
-[How can immutability in mapStateToProps cause components to render unnecessarily?](#how-can-immutability-in-mapstatetoprops-cause-components-to-render-unnecessarily)
26
-
-[What approaches are there for handling data immutability? Do I have to use Immer?](#what-approaches-are-there-for-handling-data-immutability-do-i-have-to-use-immer)
27
-
-[What are the issues with using JavaScript for immutable operations?](#what-are-the-issues-with-using-plain-javascript-for-immutable-operations)
-[Do I have to put all my state into Redux? Should I ever use React's `useState` or `useReducer`?](#do-i-have-to-put-all-my-state-into-redux-should-i-ever-use-reacts-usestate-or-usereducer)
15
-
-[Further information](#further-information)
16
-
-[Can I put functions, promises, or other non-serializable items in my store state?](#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)
17
-
-[Further information](#further-information-1)
18
-
-[How do I organize nested or duplicate data in my state?](#how-do-i-organize-nested-or-duplicate-data-in-my-state)
19
-
-[Further information](#further-information-2)
20
-
-[Should I put form state or other UI state in my store?](#should-i-put-form-state-or-other-ui-state-in-my-store)
21
-
-[Further Information](#further-information-3)
22
-
23
-
## Organizing State
7
+
## Redux FAQ: Organizing State
24
8
25
9
### Do I have to put all my state into Redux? Should I ever use React's `useState` or `useReducer`?
Copy file name to clipboardExpand all lines: docs/faq/Performance.md
+1-21Lines changed: 1 addition & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,27 +4,7 @@ title: Performance
4
4
sidebar_label: Performance
5
5
---
6
6
7
-
# Redux FAQ: Performance
8
-
9
-
## Table of Contents
10
-
11
-
-[Redux FAQ: Performance](#redux-faq-performance)
12
-
-[Table of Contents](#table-of-contents)
13
-
-[Performance](#performance)
14
-
-[How well does Redux “scale” in terms of performance and architecture?](#how-well-does-redux-scale-in-terms-of-performance-and-architecture)
15
-
-[Further information](#further-information)
16
-
-[Won't calling “all my reducers” for each action be slow?](#wont-calling-all-my-reducers-for-each-action-be-slow)
17
-
-[Further information](#further-information-1)
18
-
-[Do I have to deep-clone my state in a reducer? Isn't copying my state going to be slow?](#do-i-have-to-deep-clone-my-state-in-a-reducer-isnt-copying-my-state-going-to-be-slow)
19
-
-[Further information](#further-information-2)
20
-
-[How can I reduce the number of store update events?](#how-can-i-reduce-the-number-of-store-update-events)
21
-
-[Further information](#further-information-3)
22
-
-[Will having “one state tree” cause memory problems? Will dispatching many actions take up memory?](#will-having-one-state-tree-cause-memory-problems-will-dispatching-many-actions-take-up-memory)
23
-
-[Further information](#further-information-4)
24
-
-[Will caching remote data cause memory problems?](#will-caching-remote-data-cause-memory-problems)
25
-
-[Further information](#further-information-5)
26
-
27
-
## Performance
7
+
## Redux FAQ: Performance
28
8
29
9
### How well does Redux “scale” in terms of performance and architecture?
Copy file name to clipboardExpand all lines: docs/faq/ReactRedux.md
+1-23Lines changed: 1 addition & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,29 +4,7 @@ title: React Redux
4
4
sidebar_label: React Redux
5
5
---
6
6
7
-
# Redux FAQ: React Redux
8
-
9
-
## Table of Contents
10
-
11
-
-[Redux FAQ: React Redux](#redux-faq-react-redux)
12
-
-[Table of Contents](#table-of-contents)
13
-
-[React Redux](#react-redux)
14
-
-[Why should I use React-Redux?](#why-should-i-use-react-redux)
15
-
-[Further Information](#further-information)
16
-
-[Why isn't my component re-rendering, or my mapStateToProps running?](#why-isnt-my-component-re-rendering-or-my-mapstatetoprops-running)
17
-
-[Further information](#further-information-1)
18
-
-[Why is my component re-rendering too often?](#why-is-my-component-re-rendering-too-often)
19
-
-[Further information](#further-information-2)
20
-
-[How can I speed up my `mapStateToProps`?](#how-can-i-speed-up-my-mapstatetoprops)
21
-
-[Further information](#further-information-3)
22
-
-[Why don't I have `this.props.dispatch` available in my connected component?](#why-dont-i-have-thispropsdispatch-available-in-my-connected-component)
23
-
-[Further information](#further-information-4)
24
-
-[Should I only connect my top component, or can I connect multiple components in my tree?](#should-i-only-connect-my-top-component-or-can-i-connect-multiple-components-in-my-tree)
25
-
-[Further information](#further-information-5)
26
-
-[How does Redux compare to the React Context API?](#how-does-redux-compare-to-the-react-context-api)
Copy file name to clipboardExpand all lines: docs/faq/Reducers.md
+1-13Lines changed: 1 addition & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,19 +4,7 @@ title: Reducers
4
4
sidebar_label: Reducers
5
5
---
6
6
7
-
# Redux FAQ: Reducers
8
-
9
-
## Table of Contents
10
-
11
-
-[Redux FAQ: Reducers](#redux-faq-reducers)
12
-
-[Table of Contents](#table-of-contents)
13
-
-[Reducers](#reducers)
14
-
-[How do I share state between two reducers? Do I have to use `combineReducers`?](#how-do-i-share-state-between-two-reducers-do-i-have-to-use-combinereducers)
15
-
-[Further information](#further-information)
16
-
-[Do I have to use the `switch` statement to handle actions?](#do-i-have-to-use-the-switch-statement-to-handle-actions)
17
-
-[Further information](#further-information-1)
18
-
19
-
## Reducers
7
+
## Redux FAQ: Reducers
20
8
21
9
### How do I share state between two reducers? Do I have to use `combineReducers`?
Copy file name to clipboardExpand all lines: docs/faq/StoreSetup.md
+1-15Lines changed: 1 addition & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,21 +4,7 @@ title: Store Setup
4
4
sidebar_label: Store Setup
5
5
---
6
6
7
-
# Redux FAQ: Store Setup
8
-
9
-
## Table of Contents
10
-
11
-
-[Redux FAQ: Store Setup](#redux-faq-store-setup)
12
-
-[Table of Contents](#table-of-contents)
13
-
-[Store Setup](#store-setup)
14
-
-[Can or should I create multiple stores? Can I import my store directly, and use it in components myself?](#can-or-should-i-create-multiple-stores-can-i-import-my-store-directly-and-use-it-in-components-myself)
15
-
-[Further information](#further-information)
16
-
-[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?](#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)
17
-
-[Further information](#further-information-1)
18
-
-[How do I subscribe to only a portion of the state? Can I get the dispatched action as part of the subscription?](#how-do-i-subscribe-to-only-a-portion-of-the-state-can-i-get-the-dispatched-action-as-part-of-the-subscription)
19
-
-[Further information](#further-information-2)
20
-
21
-
## Store Setup
7
+
## Redux FAQ: Store Setup
22
8
23
9
### Can or should I create multiple stores? Can I import my store directly, and use it in components myself?
0 commit comments