blob: 4fb3390aa74154ac4b17e73f81daa83cabe2b452 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
import { Map } from 'immutable'
import { NEW_GAME } from './constants'
const initialState = Map({})
export default function reducer(state = initialState, action) {
switch (action.type) {
case NEW_GAME:
return state.set(action.game.get('id'), action.game)
default:
return state
}
}
|