There was an error while loading. Please reload this page.
1 parent ad4eb67 commit 9fdb1eeCopy full SHA for 9fdb1ee
src/actions/authorActions.js
@@ -0,0 +1,17 @@
1
+"use strict";
2
+
3
+var Dispatcher = require('../dispatcher/appDispatcher');
4
+var AuthorApi = require('../api/authorApi');
5
6
+var AuthorActions = {
7
+ createAuthor: function(author){
8
+ var newAuthor = AuthorApi.saveAuthor(author);
9
10
+ Dispatcher.dispatch({
11
+ actionType:
12
+ author:
13
+ })
14
+ }
15
+}
16
17
+module.exports = AuthorActions;
src/constants/actionTypes.js
@@ -0,0 +1,7 @@
+"use strinct";
+var keyMirror = require('react/lib/keyMirror');
+module.exports = keyMirror({
+ CREATE_AUTHOR: null
+});
src/dispatcher/appDispatcher.js
@@ -0,0 +1,5 @@
+var Dispatcher = require('flux').Dispatcher;
+module.exports = new Dispatcher;
0 commit comments