import { fromJS } from 'immutable';
import {
    SERVER_DATA_ACTIVE_SYMBOLS,
} from '../_constants/ActionTypes';

const initialState = fromJS([]);

export default (state = initialState, action) => {
    switch (action.type) {
        case SERVER_DATA_ACTIVE_SYMBOLS: {
            const activeSymbols = action.serverResponse.active_symbols;
            return state.merge(activeSymbols);
        }
        default:
            return state;
    }
};

import { fromJS } from 'immutable';
import {
    SERVER_DATA_ACTIVE_SYMBOLS,
} from '../_constants/ActionTypes';

const initialState = fromJS([]);

export default (state = initialState, action) => {
    switch (action.type) {
        case SERVER_DATA_ACTIVE_SYMBOLS: {
            const activeSymbols = action.serverResponse.active_symbols;
            return fromJS(activeSymbols);
        }
        default:
            return state;
    }
};

Replace active symbols, dont merge
Replace active symbols, dont merge
