I've started coming up with cursed React hook dependency arrays. This logic I wrote technically returns the values I am after, Record<string, KeyValObject> ie just those strings and ignores the object, however I am not 100% sure its doing what I expect under the hood. However I am about to test it with the useEffect() hook and hopfully we see useEffect() just run on when the values of those keys change. Its not crazy cursed yet (and might just not work at all like I want), but its a base to filter deeper into my object and produce a truly cursed dep array
[JSON.stringify(clickedNodesToDisplay, function(key, value){return (typeof value === 'object') ? Object.keys(value) : value }), JSON.stringify(squareSelectedNodesToDisplay, function(key, value){return (typeof value === 'object') ? Object.keys(value) : value })])
