我认为它的工作方式不同,但我不知道它是如何工作的。使用类变量export default class Test extends Component { this.active = false; </div> }
export default class Test extends Component {construc
", store.textTwo);};
如果我使用上面的mapStateToProps函数来connect react-redux的方法,并更新状态,它将console.log更改mapStateToProps函数,但不会重新呈现组件,甚至不会出现componentWillReceiveProps钩子。{ ...store.textTwo }; <-- this will re render