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
From your store defination,
return combineReducers({
nav: navReducer,
signUpReducer : signUpReducer,
});
You defined the key signUpReducer for your SignUp component state.
In order to access the state of this component,you should use this key followed by the state name.
The correct way to access user is :
export default connect(
state => ({
user : state.signUpReducer.user
})
//use signUpReducer key
FOR ME ALSO THIS IS WORKING componentWillReceiveProps(nextProps)
componentWillReceiveProps(nextProps) {
console.log();
this.setState({propUser : nextProps.user})
}