I attempted to import _Easing_ which is specified as a React VR API like so:
~
import {
Text,
View,
Animated,
Easing
} from 'react-vr';
~
Since Text, View, and Image are found in React Native and React VR but imported from _react_vr_, one would expect to be able to import _Easing_ from react-vr.
Easing came up as undefined when importing from react-vr.
The only solution was to import Easing from _react_native_:
import { Easing } from 'react-native';
The versions of Text, View, Animated, etc that we provide on React VR are different from their React Native implementations. For things like Easing that are the same in RN, we don't proxy them over to the react-vr package. It'd be too much effort to copy over every export of RN, and update it on each new release (they're lazy-loaded, so we can't just do it automatically with a spread operator or something). I'd classify this as expected behavior.
The problem is this is never mentioned anywhere, so it is quite confusing, because the docs do not distinguish between Animated and Easing (they are both in API section). Should there be React VR APIs and APIs sections, each documented with the correct way to use the modules?
Most helpful comment
The problem is this is never mentioned anywhere, so it is quite confusing, because the docs do not distinguish between
AnimatedandEasing(they are both in API section). Should there beReact VR APIsandAPIssections, each documented with the correct way to use the modules?