code: function recursiveListen(
    object,
    accumulator: ResultArray | ResultObject,
    accIndex: number,
    cb: Function
  ): RecResult {
    if (Array.isArray(object)) {
      let initialValue = new AnimatedTracker([], []);
      return object.reduce(
        (previousValue, currentValue, currentIndex, array) => {
          const result = recursiveListen(
            currentValue,
            previousValue.values,
            currentIndex,
            cb
          );
          previousValue.values[currentIndex] = result.values;
          previousValue.listeners[currentIndex] = result.listeners;
          return previousValue;
        },
        initialValue
      );
    }
    if (
      object instanceof Animated.Value ||
      object instanceof Animated.Interpolation
    ) {
      const id = addListenerForAnimated(object, accumulator, accIndex, cb);
      return new AnimatedTracker(
        object.__getValue(),
        new ListenerTracker(id, object)
      );
    }
    if (typeof object === 'object' && object !== null) {
      let initialValue = new AnimatedTracker({}, {});
      return Object.keys(object).reduce((previousValue, currentValue) => {
        const value = object[currentValue];
        const result = recursiveListen(
          value,
          previousValue.values,
          currentValue,
          cb
        );
        previousValue.values[currentValue] = result.values;
        previousValue.listeners[currentValue] = result.listeners;
        return previousValue;
      }, initialValue);
    }
    return new AnimatedTracker(object);
  }
docs: Iterates object keys to find Animated objects to add listeners to and returns an object of values and listeners. The values field will be shaped identically to the passed in object with the Animated objects replaced with the value from __getValue at the time it was called.