-
React twitter plz help: I have a hook - a generic fetching function - which takes an
args
param of type {[string]: string} (basically any JSON body). how do I pass that mystery args object as a dependency to useCallback without it re-rendering constantly? -
…in reply to @type__error
useCallback(() => {}, [args]) re-renders because presumably the reference to args is changing, even if the values aren't. i don't know what the values are as it's generic.