Why are the models and effects in my connect's loading empty?

const Login = ({
                 login,
                 dispatch,
                 loading,
                 form: {
                   validateFields,
                   getFieldDecorator,
                   setFieldsValue,
                   setFields
                 }
               }) => {
  console.log(loading)
  return (
    <div>login</div>
  );
};

Login.propTypes = {
  login: PropTypes.object,
  dispatch: PropTypes.func,
  loading: PropTypes.object
};
export default connect(({ login,loading }) => ({ login,loading }))(Form.create()(Login));

Why is the result printed out by writing loading like this:


clipboard.png

Mar.21,2021

this print is correct, which also means that loading is used correctly. Global:false is the use of this loading. If you load data asynchronously, will this value change from true to false,


solved? I also have this problem. I have no information when the page is initialized. After clicking the query button, I call the asynchronous function. Tangled.

Menu