code: function forFade(props) {
    const { layout, position, scene } = props;
  
    if (!layout.isMeasured) {
      return forInitial(props);
    }
    const interpolate = getSceneIndicesForInterpolationInputRange(props);
  
    if (!interpolate) return { opacity: 0 };
  
    const { first, last } = interpolate;
    const index = scene.index;
    const opacity = position.interpolate({
      inputRange: [first, index, last],
      outputRange: [0, 1, 1],
    });
  
    return {
      opacity,
    };
  }
docs: fadeIn and fadeOut