I'm trying to fetch information from my local API with React-native and expo using the fetch method.
export function getBoardGamesFromApiWithSearchedText (text) {
const url = 'http://localhost:2021/boardgame/list'
return fetch(url)
.then((response) => response.json())
.catch((error) => console.error(error))
}
I have this error :
Network request failed at node_modules/whatwg-fetch/dist/fetch.umd.js:535:17 in setTimeout$argument_0
I saw that many people had this problem, apparently solved with the following solution: https://jsshowcase.com/question/react-native-fetch-https-localhost-network-request-failed
But I can't find the info.plist file maybe in the app.json but what should I configure?
I'm new to react native. Can someone help me on this ?