×
You must pass a component to the function returned by connect. Instead received {"kind":"class","elements":[{"kind":"method","key":"render","placement":"prototype","descriptor":{"writable":true,"configurable":true,"enumerable":false}}]}
â–¶ 5 stack frames were collapsed.
Module../src/pages/login/Login.jsx
C:/Users/leese/Desktop/xiaoyuanwang/src/pages/login/Login.jsx:12
```
9 | const mapDispatchToProps = {};
10 |
11 | @connect(mapStateToProps, mapDispatchToProps)
12 | class Login extends React.Component {
13 | render() {
14 | console.log(this.props)
15 | return (
We do not recommend using connect as a decorator, because the spec is unstable.
Also, this is a bug tracker, not a support system. For usage questions, please use Stack Overflow or Reactiflux where there are a lot more people ready to help you out - you'll probably get a better answer faster. Thanks!
We do not recommend using
connectas a decorator, because the spec is unstable.Also, this is a bug tracker, not a support system. For usage questions, please use Stack Overflow or Reactiflux where there are a lot more people ready to help you out - you'll probably get a better answer faster. Thanks!
decorator is better to read