Skip to content

Instantly share code, notes, and snippets.

@edrpls
Created July 25, 2019 18:59
Show Gist options
  • Save edrpls/4a8f1d0d9452ae4ad77a9277578c722a to your computer and use it in GitHub Desktop.
Save edrpls/4a8f1d0d9452ae4ad77a9277578c722a to your computer and use it in GitHub Desktop.
// 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