sayll/react-webpack-start

View on GitHub
app/view/index/actions/index.jsx

Summary

Maintainability
A
0 mins
Test Coverage
import { createAction } from 'redux-actions';

let todoIdCount = 0;
export const ADD_TODO = createAction('ADD_TODO', text => ({
  text,
  id: todoIdCount++,
  isComplete: false
}));
export const DELETE_TODO = createAction('DELETE_TODO', id => id);
export const COMPLETE_TODO = createAction('COMPLETE_TODO', id => id);
export const FILTER_TODO = createAction('FILTER_TODO', filter => filter);
export const CLEAR_TODO = createAction('CLEAR_TODO', () => {
  todoIdCount = 0;
});