React native redux map state to props not working

后端 未结 2 534
轮回少年
轮回少年 2020-12-18 05:45

I am new to react-native and I am trying to implement a simple sign up functionality using react-redux. For some reasons , mapping the state to props in connect is not work

2条回答
  •  不思量自难忘°
    2020-12-18 06:44

    FOR ME ALSO THIS IS WORKING componentWillReceiveProps(nextProps)

    componentWillReceiveProps(nextProps) {
    
     console.log();
     this.setState({propUser : nextProps.user})
    }
    

提交回复
热议问题