Created
October 2, 2017 03:09
-
-
Save Calvin-Huang/319be6649604a3a99252e88167bd6715 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (global, factory) { | |
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | |
typeof define === 'function' && define.amd ? define(['exports'], factory) : | |
(factory((global.actions = global.actions || {}))); | |
}(this, (function (exports) { | |
'use strict'; | |
/** | |
* Action types | |
*/ | |
const actionTypes = { | |
FETCH_PUBLIC_REPOS: 'FETCH_PUBLIC_REPOS', | |
RECEIVE_PUBLIC_REPOS: 'RECEIVE_PUBLIC_REPOS', | |
FETCH_REPOS_NEXT_PAGE: 'FETCH_REPOS_NEXT_PAGE', | |
.... | |
} | |
/** | |
* Action creators | |
*/ | |
const actions = { | |
fetchPublicRepos: () => ({ | |
type: actionTypes.FETCH_PUBLIC_REPOS, | |
}), | |
.... | |
showNotification: (message) => ({ | |
type: actionTypes.SHOW_NOTIFICATION, | |
message: message, | |
}), | |
} | |
exports.types = actionTypes; | |
exports.default = Object.assign(actions, { types: actionTypes }); | |
Object.defineProperty(exports, '__esModule', { value: true }); | |
}))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment