Skip to content

Commit 75470ea

Browse files
committed
Merge pull request #3 from cogell/fix-usage-example-error
Fix small errors in main usage example
2 parents 75c679c + 2ec3b12 commit 75470ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The **controller** factory requires 3 parameters:
2323

2424
The functionality of the controller layer is implemented using [generator functions](http://www.2ality.com/2015/03/es6-generators.html). Within these functions, `yield` may be used await the results of [Promises](http://www.2ality.com/2014/09/es6-promises-foundations.html) and to request selector values and root component properties. As a very rough sketch of how you might use this library:
2525

26-
```
26+
```javascript
2727
// controllers/app_controller.js
2828

2929
import { controller, getProps } from 'react-redux-controller';
@@ -39,7 +39,7 @@ const controllerGenerators = {
3939
dispatch(actions.fetchingData());
4040
try {
4141
const apiData = yield httpRequest(`http://myapi.com/${otherData}`);
42-
retudrn dispatch(actions.fetchingSuccessful(apiData));
42+
return dispatch(actions.fetchingSuccessful(apiData));
4343
} catch (err) {
4444
return dispatch(actions.errorFetching(err));
4545
}

0 commit comments

Comments
 (0)