function fetchUsers() {
  return dispatch => {
    // handling API call
    return fetch("http://localhost:61080/api/users")
      .then(res => res.json())
      .then(json => {
        let users = json;
        //dispatching users
        //console.log(users);
        dispatch(fetchUsersSuccess(users));
      });
  };
}
// fetch method to handle API call and extract data of users
fetch method to handle API call and extract data of users
fetch method to handle API call and extract data of users
function fetchUsers() {
  return dispatch => {
    return fetch("http://localhost:61080/api/users")
      .then(res => res.json())
      .then(json => {
        let users = json;
        dispatch(fetchUsersSuccess(users));
      });
  };
}
function fetchUsers ( ) { return dispatch => { return fetch ( "http://localhost:61080/api/users" ) . then ( res => res . json ( ) ) . then ( json => { let users = json ; dispatch ( fetchUsersSuccess ( users ) ) ; } ) ; } ; }
fetch method to handle API call and extract data of users
fetch method to handle API call and extract data of users
// handling API call //dispatching users //console.log(users);