-
-
Save edrpls/4a8f1d0d9452ae4ad77a9277578c722a 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
// ClientActions.js | |
// Flux dispatcher | |
import Dispatcher from 'flux/lib/Dispatcher'; | |
// Instance of flux dispatcher | |
const AppDispatcher = new Dispatcher(); | |
// Flux actions | |
const ClientActions = { | |
getClients() { | |
AppDispatcher.dispatch({ | |
actionType: 'GET_CLIENTS' | |
}); | |
}, | |
toggleSorting() { | |
AppDispatcher.dispatch({ | |
actionType: 'TOGGLE_SORTING' | |
}); | |
} | |
}; | |
// Export the actions | |
export default AdminActions; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment