И
Size: a a a
И
AM
ES
V
AS
AS
И
AS
ES
ES
DN
function reducer (state, action) {
switch (action.type) {
case 'SET_TICKERS':
return action.payload
default:
return state
}
}
const store = createStore( reducer, null, applyMiddleware(thunk));
if(state===null) {
return action.payload
}else {
return state.map(ticker=> {
if(ticker.name === action.payload[i].name) {
return {...ticker,
...action.payload[i]
}
}
})
}DV
DV
И
DV
DV
SG
SG
ES