shopify-app-template-node icon indicating copy to clipboard operation
shopify-app-template-node copied to clipboard

remove pointless useCallback

Open L3P3 opened this issue 3 years ago • 0 comments

WHY are these changes introduced?

useCallback is there so that you have a non-changing value that can be passed down without needless updates caused by that. useEffect just runs the given function. The only reason useCallback was used here is so that the dependency list of useEffect does not change. By just passing the function directly, putting it into the deps list is not even required.

WHAT is this pull request doing?

Simplifying the code while maintaining functionality.

L3P3 avatar Aug 01 '22 10:08 L3P3