1
this.state = {
  loading: false,
  timer: false,
  showZero: false,
  pin: '',
  error: {
    emptyPin: false,
    checkPin: false,
    wrongPin: false,
    message: '',
    devices: undefined,
    type: 999,
    checkBoxStr: '',
  },
  showDialog: false,
  showSnackBar: false,
  singleButtonDialog: false,
  disabledButton: true,
  checkBox: false,
  seconds: 0,
};

这是状态值,如果可能的话,我需要卸载值Componentwillunmount请告诉我

我收到了这个错误

Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
in VerifyOtp (created by WithStyles(VerifyOtp))
in WithStyles(VerifyOtp) (created by Context.Consumer)
4

0 回答 0