{ tweets: tweets.data }
const reducer = (state = { tweets: tweets.data }, action) => {
switch (action.type) {
case 'DELETE': {
return {
...state,
tweets: state.tweets.filter(value => value.id !== action.id),
};
}
default:
return state;
}
};