I'm trying to get data from an external API and then render it into a flatlist.

I'm very new to React Native so this may be easy to solve.

I'm trying to use the following data: <https://www.nationaltrust.org.uk/search/data/all-places>

I want to fetch it from the URL, and render the 'title' and 'imageUrl' fields into a flatlist component.

This is what I have so far:

```
const placesURL = "https://www.nationaltrust.org.uk/search/data/all-places";

const [isLoading, setLoading] = useState(true);
const [places, setPlaces] = useState([]);

useEffect(() => {
fetch(placesURL)
.then((response) => response.json())
.then((json) => setPlaces(json))
.catch((error) => alert(error))
.finally(setLoading(false));
})

```

And in the flatlist:

```

export default function App() {
return (
<View style={styles.container}>
<FlatList
data={places}
renderItem={({ item }) => (
<Text>{item.title}</Text>
)}
keyExtractor={(item) => item.id}

      />
      <StatusBar style="auto" />
    </View>

);
}

```

If anyone could tell me what to do I would really appreciate it.