shopify-app-template-node
shopify-app-template-node copied to clipboard
remove pointless useCallback
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.