Answer the question
In order to leave comments, you need to log in
`
In an async function, when I call setState the component doesn't get re-rendered?
verifyProjectSkill = async skill => {
try {
let result = await fetch(`/skills/verify?project_skill_id=${projectSkill.id}`);
let project_skill_verification = await result.json();
skill.project_skills_verifications.push(project_skill_verification);
setSkills(projectSkills)
}
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question