Updating Redux state does not trigger componentWillReceiveProps

前端 未结 3 790
南笙
南笙 2020-12-29 04:41

I\'m trying to validate the login information. After making sure the login is valid I want to fire a new route. I pass the state.loginReducer.login as props. When I handle t

3条回答
  •  南笙
    南笙 (楼主)
    2020-12-29 05:06

    ComponentWillReceiveProps (nextprops)
    

    should be

    componentWillReceiveProps (nextprops)
    

    The C should be lower case. Actually, mapStateToProps triggers componentWillReceiveProps. I'm sure about that.

提交回复
热议问题