0

Anyone can tell me difference between useeffet({}, []) useeffet({}, undefine) useeffet({})

13th Jul 2022, 9:59 AM
AKSHAY SALVE
AKSHAY SALVE - avatar
1 Answer
+ 1
useeffect({},[]) effect function Will only trigger once when the component mounts and not when props change useeffect ({},undefine) never seen It before. Second argument must be Array useeffect({}) effect Will trigger Always in a loop of death... see It in console log
13th Jul 2022, 12:02 PM
Marco Ginato
Marco Ginato - avatar