|
1
|
import dispatchers from './dispatchers'; |
|
2
|
import DEFAULT_STATE from './default.state'; |
|
3
|
|
|
4
|
export default function ( state = DEFAULT_STATE, action ) { |
|
5
|
const callback = dispatchers[ action?.type ]; |
|
6
|
|
|
7
|
if ( callback ) { |
|
8
|
return callback( state, action ); |
|
9
|
} |
|
10
|
|
|
11
|
return state; |
|
12
|
}
|