Skip to content

Instantly share code, notes, and snippets.

@jmenglis
Created March 21, 2017 20:09
Show Gist options
  • Save jmenglis/adcfedc726bb470a3b14af578ce3fe01 to your computer and use it in GitHub Desktop.
Save jmenglis/adcfedc726bb470a3b14af578ce3fe01 to your computer and use it in GitHub Desktop.
Simple Actions
export const addTodo = (text) => {
return {
type: 'ADD_TODO',
id: (nextTodoId++).toString(),
text,
};
};
export const addTodo = (text) => ({
type: 'ADD_TODO',
id: (nextTodoId++).toString(),
text,
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment