UNPKG

qobuz-ui

Version:

Interface react pour application web et desktop

13 lines (11 loc) 309 B
import { INCREMENT_COUNTER, DECREMENT_COUNTER } from '../actions/counter'; export default function counter(state = 0, action) { switch (action.type) { case INCREMENT_COUNTER: return state + 1; case DECREMENT_COUNTER: return state - 1; default: return state; } }