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: README.md
+12-7Lines changed: 12 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ The new version of Lightning-Redux simplifies the previous iteration down to a s
5
5
6
6
### Component Methods
7
7
####
8
-
##### createStore(name, reducer, initialState, middleware): create the Redux store.
8
+
**createStore(name, reducer, initialState, middleware):** create the Redux store.
9
9
10
10
name: The name of the slice of state for the reducer creating the store.
11
11
@@ -15,28 +15,33 @@ initialState: You can specify an initial shape to your store's shape.
15
15
16
16
middleware: You can include redux middleware like redux-thunk here. Lightning-Redux automatically wraps this with Redux compose.
17
17
18
-
##### dispatch(action): Works like you would expect. Dispatches the action to the Redux store. Fun fact: connect also sets a dispatch expando on the connected component for convenience.
18
+
**dispatch(action):** Works like you would expect. Dispatches the action to the Redux store. Fun fact: connect also sets a dispatch expando on the connected component for convenience.
19
19
20
-
##### subscribe(listener): This shouldn't be needed to be implemented, but is provided in case you want to write a custom connect method. The listener callback will be called on store updates.
20
+
**subscribe(listener):** This shouldn't be needed to be implemented, but is provided in case you want to write a custom connect method. The listener callback will be called on store updates.
21
21
22
-
##### replaceReducer(nextReducer): Wraps Redux's replaceReducer function. Replaces the reducer function in the redux store.
22
+
**replaceReducer(nextReducer):** Wraps Redux's replaceReducer function. Replaces the reducer function in the redux store.
23
23
24
-
##### registerReducer(name, reducer): Adds the specified reducer function to the redux store with the specificed name as it's slice of state.
24
+
**registerReducer(name, reducer):** Adds the specified reducer function to the redux store with the specificed name as it's slice of state.
25
25
26
-
##### connect(mapStateToAttributes, target): mapStateToAttributes is a key pair object where the key is the attribute on the component you want set, and the value is either the value in the redux state graph, or a callback function. This function receives the component and state to compute the value. You can pass the component you want connected, but if it isn't populated, it will get populated by event.getSource(). It also sets a dispatch expando for convenience in the component's controller methods.
26
+
**connect(mapStateToAttributes, target):** mapStateToAttributes is a key pair object where the key is the attribute on the component you want set, and the value is either the value in the redux state graph, or a callback function. This function receives the component and state to compute the value. You can pass the component you want connected, but if it isn't populated, it will get populated by event.getSource(). It also sets a dispatch expando for convenience in the component's controller methods.
27
27
28
-
##### getState: Technically not a component method, this is a convenience expando that allows access to the Redux state.
28
+
**getState():** Technically not a component method, this is a convenience expando that allows access to the Redux state.
0 commit comments