79457396

Date: 2025-02-21 12:49:34
Score: 2.5
Natty:
Report link

For the ones interested, i got an answer with the AI by retrieving data from fetch into a 'useState' local storage and by using useEffect function:

const PostScreen = () => { const [Posts, setData] = useState(null); useEffect(() => { const fetchData = async () => { try { const response = await fetch("http://192.168.0.12:8085" + "/Posts_to_App", {headers: { "content-type": "application/json" }}); const result = await response.json(); setData(result); } catch (error) { console.error('Erreur lors de la récupération des données:', error); } }; fetchData(); }, []);

Regards

Reasons:
  • Blacklisted phrase (1): Regards
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Nicolas de CLEMECIN