Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

setstate do not update emidiatly

//if some of your code depends on that state update you can use a useeffect like this
 useEffect(() => {
        if (currentProgress[index].progress === 100) {
            GoBack()
        }
    }, [currentProgress])
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #setstate #update #emidiatly
ADD COMMENT
Topic
Name
2+2 =