I have two independent components called login and home. I have used mapStateToProps in login component to pass data.
function mapStateToProps(state) {
return { loginData: state.agent };
}
export default withRouter(connect(mapStateToProps)(login));
A button click from the login component will navigate us to the home page. I want to get and display all the 'loginData' values in the home component. I have tried this.props.loginData in home comp. But didn't get the store data. Any suggestions on this?