react to use some of the notes Hook

   memo

Is a component for rendering of whether reuse, re-rendering to optimize the function of the component behavior, 
in the case where property values are passed unchanged, it will not trigger re-rendering component

userMemo
a function logic is executed repeatedly
consistent syntax and useEffect, but the need to return value, return value can be directly involved in rendering, therefore useMemo is done during rendering

Guess you like

Origin www.cnblogs.com/musi03/p/11589163.html