useMemo,useEffect,useCallback
Does this three hook will be return and execute in the first rendering of the component?
1 Reply
useEffect can execute when it first renders. useCallback will return the function that is cached, but will not execute it. useMemo will return the memo-ized value it has.
for useCallback, the function is returned, but you have to choose if you call () whatever function you have cached in the callback