Failed getting data from API React Native Project

I am trying to follow Mosh lesson to fetch data from API using apisuace.

But it keep return me null value when i try to print using console.log( after api call.

const [listings, setListings] = useState([]);

  useEffect(() => {


  }, []);

  const loadListings = async () => {

    const response = await listingsApi.getListings();




Here is my client.js file.

import { create } from "apisauce";

const apiClient = create({

  baseURL: "",


export default apiClient;

I also tried to access the following url from my web browser the data is showing.

``Is anyone know what is the problem? Thanks a lot!.

I am facing the same issue. Did you managed to get the solution?

1 Like

did you solve the problem, Im passing null data when loading the listings?