How to deal with data in redux?

the specific scenarios are as follows:

// reducer.js
const initialState = {
    test: [
        {    
            id: 1
            show: true    
        },
        {    
            id: 2
            show: true    
        },
        {    
            id: 3
            show: true    
        }
    ]
}
export function testUp(state=initialState, action) {
    switch (action.type) {
        case UPDATE: {
          return {
            ...state,
            // ...action.payload, cidList
            takeCidList(state.test, action.payload)
          }
        }
        default:
          return state
      }
}
function takeCidList(test, cidList) {
    const list = []
    // todo get initialState.test
    return list
}

// test.jsx
class Test extends Component {
    // ...
    updateTestState = idList => {
        this.props.updateTestState(idList)
        // idList = [1,4,6,8] id
    }
}
export default connect(null, {updateTestState})(Test)

// action.js
export const updateTestState = idList => ({type: UPDATE, payload: idList})
To put it simply, I am what I got in the react component is an array of id. What I need to do is to find out that the id in the test array in state is equal to [1 code 2 show 3 code 4] and change their false field to . So where should such a step be done?
in test.jsx? So I need to get the state of test in test.jsx. And is it really good to handle data in a container component?
in reducer.js? It doesn"t feel pure enough, huh?

Mar.20,2021
In the case of

this, the data in state is generally general-purpose data, and then it can be mapped on demand according to the data structure required by a component. As for where you say to do this step, do it in mapStateToProps , so that you can map appropriately according to the needs of the component. The data structure of state had better be flattened. I hope it will help you

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1becc97-31b33.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1becc97-31b33.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?