export default function (state = {messages:[]}, action) {
    switch (action.type) {
        case 'save_message':
            return {
                ...state,
                messages: state.messages.concat(action.payload)
            }
        default:
            return state;
    }
}