export const getAllTasks = () => dispatch => { axios.get(`https://api.cosmicjs.com/v1/your-bucket-slug-name/object-type/tasks`) .then((response) => { return response.data; }) .then((tasks) => { dispatch(getTasks(tasks)) }) .catch((err) => { console.error.bind(err); }) };
How to Build a ToDo App Using React, Redux, and Webpack
Tony Spiro
2314

Funzione per il dispatcher tramite redux

Show your support

Clapping shows how much you appreciated Valerio Volpe’s story.