There is a problem when using antd pro. When the payload parameter in effects does not change, there is no request background, but the cache of the last request is obtained.

problem description

there is a problem when using antd pro. When the payload parameter in effects does not change, there is no request background, but the cache of the last request is obtained

the environmental background of the problems and what methods you have tried

related codes

/ / Please paste the code text below (do not replace the code with pictures)

effects: {
    * fetch({ payload }, { call, put }) {
      const response = yield call(getTableData, payload)
      yield put({
        type: "save",
        payload: {
          list: response.rows,
          pagination: {
            total: response.total,
            current: response.currentPage,
          },
        },
      })
    },
},
 reducers: {
    save(state, action) {
      return {
        ...state,
        data: action.payload,
      }
    },
  },

what result do you expect? What is the error message actually seen?

expect to request the background to update page data

Sep.17,2021

I have the same problem


https://github.com/ant-design.
here is the built-in cache code, which can be removed

Menu