function buildLayers(newChildren, oldChildren) {
  return newChildren.map((child, index) => {
    const oldProps = oldChildren[index] ? oldChildren[index].props : {};
    const newProps = child.props;

    const oldAnimatedProps = extractAnimatedPropValues({
      ...oldProps,
      animatedProps: ANIMATED_SERIES_PROPS
    });
    const newAnimatedProps = newProps
      ? extractAnimatedPropValues({
          ...newProps,
          animatedProps: ANIMATED_SERIES_PROPS
        })
      : null;
    const interpolator = interpolate(oldAnimatedProps, newAnimatedProps);

    return {
      renderLayer: child.type.renderLayer,
      newProps: child.props,
      animation: child.props.animation,
      interpolator
    };
  });
}
Build an array of layer of objects the contain the method for drawing each series
as well as an interpolar (specifically a d3-interpolate interpolator)
@param {Object} newChildren the new children to be rendered.
@param {Object} oldChildren the old children to be rendered.
@returns {Array} Object for rendering