skip to Main Content

Reactjs – Using Fetch in REACT for PUT/PATCH doesn't work for me

Hello in my React App I use this specific comportement to handle modification (status change actived/deactived) const handleActifEspece = (index, statutActif) => { let especeAActiver = especes.find(espece => espece.id === index) especeAActiver.actif = statutActif console.log(JSON.stringify(especeAActiver)) fetch(`http://localhost:8000/api/especes/${index}`, { method: 'PUT', headers:…

VIEW QUESTION
Back To Top
Search