Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react function runs several times

useEffect(() => {
    <fn name>();
}, []); // This array at end stops the fn from being called several times
Source by reactjs.org #
 
PREVIOUS NEXT
Tagged: #react #function #runs #times
ADD COMMENT
Topic
Name
6+6 =