mirror of
https://github.com/callstack/react-native-testing-library.git
synced 2026-09-18 23:09:04 +08:00
ae3d4af370
* Redux example * Reviews implemented
26 lines
436 B
JavaScript
26 lines
436 B
JavaScript
export const actions = {
|
|
ADD: '@ADD_TODO',
|
|
REMOVE: '@REMOVE_TODO',
|
|
MODIFY: '@MODIFY_TODO',
|
|
CLEAR: '@CLEAR_TODO',
|
|
};
|
|
|
|
export const addTodo = (todo) => ({
|
|
type: actions.ADD,
|
|
payload: todo,
|
|
});
|
|
|
|
export const removeTodo = (id) => ({
|
|
type: actions.REMOVE,
|
|
payload: { id },
|
|
});
|
|
|
|
export const modifyTodo = (todo) => ({
|
|
type: actions.MODIFY,
|
|
payload: todo,
|
|
});
|
|
|
|
export const clearTodos = () => ({
|
|
type: actions.CLEAR,
|
|
});
|