Module 3 of 5 · Text
Importar y exportar cosas
- import * as ACTION from '../actions/actions'; Es como decir, impórtame todo y me lo metes en una constante que es ACTION
Luego se puede consumir así: ACTION.getWriteoffsFilterCallInit()
Para exportarlo se hará de la siguiente manera:
export const getWriteoffsFilterCallInit = () => ({type: ACTION.GET_WRITEOFFS_FILTERS_INIT});
export const getActionsModalCallInit = () => ({type: ACTION.GET_WRITEOFFS_ACTIONS_MODAL_INIT});
Y desde ACTION podremos acceder a todas las funciones.