Choices/src/scripts/actions/misc.js

25 lines
419 B
JavaScript
Raw Normal View History

/**
* @returns {{ type: string }}
*/
2017-10-10 16:26:38 +02:00
export const clearAll = () => ({
type: 'CLEAR_ALL',
});
2018-05-28 17:22:22 +02:00
/**
* @param {any} state
* @returns {{ type: string, state: object }}
*/
2018-05-28 17:22:22 +02:00
export const resetTo = state => ({
type: 'RESET_TO',
state,
});
/**
* @param {boolean} isLoading
* @returns {{ type: string, isLoading: boolean }}
*/
export const setIsLoading = isLoading => ({
type: 'SET_IS_LOADING',
isLoading,
});