Skip to content

Instantly share code, notes, and snippets.

@viniciusdacal
Created July 27, 2017 20:24
Show Gist options
  • Select an option

  • Save viniciusdacal/4e1629be03e0e1faabd8e493dfa2a6de to your computer and use it in GitHub Desktop.

Select an option

Save viniciusdacal/4e1629be03e0e1faabd8e493dfa2a6de to your computer and use it in GitHub Desktop.
const TODO_ADD_REQUEST = 'TODO_ADD_REQUEST';
const TODO_ADD_RESPONSE = 'TODO_ADD_RESPONSE';
const add = (description, date) => ({
type: [TODO_ADD_REQUEST, TODO_ADD_RESPONSE],
payload: {
description,
date,
},
meta: {
url: 'path/to/to-do',
method: 'post',
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment