We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b226a62 commit 0c4aacaCopy full SHA for 0c4aaca
README.md
@@ -128,6 +128,20 @@ export default class TodosConnector extends Connector {
128
}
129
```
130
131
+#### External actions dispatching
132
+
133
+If there is a need to dispatch an action of other Connector, i.e. from other namespace,
134
+that can be done using `#dispatch` and `.action` methods, like so:
135
136
+```js
137
+// somewhere in TodosConnector.jsx
138
139
+$createTodo(todo) {
140
+ return post('/todos', { todo })
141
+ .then(() => this.dispatch(ToolbarConnector.action('incrementTodosCount')));
142
+}
143
+```
144
145
### Connection
146
147
Connection is a very simple helper object that you should inherit from instead of
0 commit comments