使用ES6 class 关键字 如何往 一个组件里面传参!谢谢!

#1

函数写法:

function Login({ form, dispatch, loading }) {
    return (
        <div>xxx</div>
    )
}

那么请问.如何往

class Login extend React.Component{
     constructor(props){
        super(props);
     }
     render(){}
}

如何传参? 写在 render() 括号里面吗?

#2

实例化时传参

#3

传参: <Login a={1} b="2" />
访问参数: 通过组件实例, this.props.a

#4

render 里直接 this.props.xxx获取