Skip to content

Instantly share code, notes, and snippets.

@eriknelson
Created June 28, 2019 19:11
Show Gist options
  • Save eriknelson/272c16289a5e825c50c1db0702a177f6 to your computer and use it in GitHub Desktop.
Save eriknelson/272c16289a5e825c50c1db0702a177f6 to your computer and use it in GitHub Desktop.
import { createActions } from 'reduxsauce';
const { Creators, Types } = createActions({
clusterFetchSuccess: ['clusterList'],
clusterFetchRequest: [],
clusterFetchFailure: [],
updateSearchTerm: ['searchTerm'],
addClusterSuccess: ['newCluster'],
addClusterFailure: ['error'],
removeClusterSuccess: ['name'],
setConnectionState: ['connectionState'],
updateClusterSuccess: ['updatedCluster'],
});
Types.START_POLLING_CLUSTERS = 'START_POLLING_CLUSTERS';
Creators.startPollingClusters = () => ({
type: Types.START_POLLING_CLUSTERS,
})
Types.STOP_POLLING_CLUSTERS = 'STOP_POLLING_CLUSTERS';
Creators.stopPollingClusters = () => ({
type: Types.STOP_POLLING_CLUSTERS,
})
export { Creators, Types };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment