score:1

Accepted answer
const mapStateToProps = state => {
    return {
      isLoggedIn : state.reducer.isLoggedIn
    };
};

score:-1

const mapDispatchToProps = (dispatch, val) => {
  return {
    setLoggedIn : (val) => dispatch({ type: 'SET_LOGGED_IN', value: val }),
  }
};

score:0

const mapStateToProps = state => {
    return {isLoggedIn : state.isLoggedIn};};

Related Query

More Query from same tag