Loading Content...
© 2024 Copyrights reserved for web-brackets.com
Joseph Morgan
29 Nov 2021
React js
Reactjs Expected a conditional expression and instead saw an assignment, i can see this warning in the console of my project how can I remove it? the function which cause this error is
async deleteCompany(id){
try{
let res = await axios.delete(BackendURL+'/save/'+id+'/');
if(res.status = 200){
this.props.reload();
}
}catch(err){
console.error(err);
}
}
what should I do?
— Update —
I found the issue. it's because inside the condition there is one “=” it supposed to be at least two “==” or three “===”
No Comments to show