type__error’s avatartype__error’s Twitter Archive—№ 12,560

    1. 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?
  1. …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.