Closed jkeane889 closed 3 years ago
The issue is valid!
Same issue here. I had to downgrade to 2.0 for now
I'm afraid I can't reproduce this. I cloned our playground app and added TS to it. Looks like it's working flawlessly and it's importing Easing too.
@jkeane889, please notice that Easing in Easing.js from Reanimated 1 is default exported which means you can import it under whatever name you want. We're importing it as EasingNode to avoid a name clash with Easing from Reanimated2.
I'm going to close this one as not reproducible but if you manage to create simple repro please share so we can check it.
Also, try clearing all caches (delete node_modules, Xcode & Gradle cache, run metro with --reset-cache flag, etc). I saw you're installing reanimated with npm, could you give Yarn a try?
I know this issue is marked as closed but if you are still experiencing it, I launched metro with npm start -- --reset-cache
and got it to finally work. Had the exact same issue as you after upgrading from a 1.x version of this package.
Description
Hi reanimated team! Thank you so much for this amazing library! I just wanted to open an issue related to the
./Easing
feature.'Our team just integrated TypeScript into our RN application, and we do still have JavaScript components as well. At the moment we are receiving this issue in our XCode terminal:
After looking through the
react-native-reanimated
node_module, we aren't sure whether the './Easing' component is being properly exported.Expected behavior
'./Easing' component is imported without error into our project.
Actual behavior & steps to reproduce
react-native-reanimated
from projectreact-native-reanimated
withnpm install react-native-reanimated
Snack or minimal code example
(In JavaScript)
import Animated, { Easing, withTiming, interpolate, Extrapolate, useSharedValue, useAnimatedStyle } from 'react-native-reanimated';
...
y.value = withTiming(0, { duration: 400, easing: Easing.bezier(0.33, 1, 0.68, 1), })
....
Package versions
"react-native-reanimated": "^2.1.0" "@types/react-native": "^0.64.2" "@types/react-test-renderer": "^17.0.1" "typescript": "^4.2.3"
Affected platforms