2017-10-04 1 views

Répondre

0

Vous pouvez consulter cet article https://daveceddia.com/ajax-requests-in-react/

Il utilise axios mais vous pouvez suivre le même schéma et remplacer le code axios avec

fetch('http://api.exampledomain.com/api/search') 
.then((response) => response.json()) 
.then((jsonData) => { 
    //handle json data processing here 
    console.log(jsonData); 
});