If I have a node who's value is dependent on two nodes upstream of it, what's the best way to watch for changes and update the value? (basically how does the example on the homepage work https://reactflow.dev/)
Should I be keeping track of the targets via onConnect and useEffect on the nodes or is there some other way? a code example would be nice, but I couldn't find anything in the docs