Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

force update function component after fetch data second time


**** You can simply define the useState like that ****

const [, forceUpdate] = React.useState(0);
 ==== >> And usage: forceUpdate(n => !n)



Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #force #update #function #component #fetch #data #time
ADD COMMENT
Topic
Name
4+3 =