* fix(ui): fix create note modal * change(ui): remove tests for a moment * change(ui): fix job name * change(ui): fix job action * change(ui): fix job action * change(ui): fix job action * change(ui): fix job action * change(ui): add testing public dir * change(ui): return silent server start * change(ui): fix session url * change(ui): fix session url * change(ui): fix session url * change(ui): fix mockup * change(ui): fix mockup * change(ui): fix snapshot images * change(ui): fix snapshot images * change(ui): fix testing app * change(ui): fix testing app * change(ui): fix testing flow and add loggs * change(ui): add network and events * change(ui): fix table view * change(ui): fix table view * change(ui): fix acc req intercept * change(ui): fix mob req intercept * change(ui): change jump method
23 lines
675 B
JavaScript
23 lines
675 B
JavaScript
const initialState = {
|
|
value: 0,
|
|
test: { key: 'test' },
|
|
deleteMe: 'a',
|
|
arr: [],
|
|
}
|
|
|
|
export function counterReducer(state = initialState, action) {
|
|
switch (action.type) {
|
|
case 'counter/incremented':
|
|
return { ...state, value: state.value + 1 }
|
|
case 'counter/decremented':
|
|
return { ...state, value: state.value - 1 }
|
|
case 'counter/test':
|
|
return { ...state, test: { key: 'value1' }, deleteMe: 'asasd'}
|
|
case 'couter/test2':
|
|
return { ...state, test: { key: 'value2' }, deleteMe: null }
|
|
case 'couter/test3':
|
|
return { ...state, test: { key: null }, deleteMe: 'aaaaa', arr: [2,2,23,3] }
|
|
default:
|
|
return state
|
|
}
|
|
}
|