Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad mapping for type undefined for key x #313

Open
dmitryusikriseapps opened this issue Jul 23, 2020 · 3 comments
Open

Bad mapping for type undefined for key x #313

dmitryusikriseapps opened this issue Jul 23, 2020 · 3 comments

Comments

@dmitryusikriseapps
Copy link

Hi guys!
react-native-interactable has a problem with react-native version 0.63
I'm getting this error if I try to use animatedValueY or animatedValueX
image
image

I found that if I send both animatedValueY and animatedValueX values this error doesn't happen, so this is a quick fix, but if I send only one of these values, the error happens.

Thank you!

@ghost
Copy link

ghost commented Aug 11, 2020

I experienced the same as @dmitryusikriseapps. I was using only animatedValueX. When adding any value for animatedValueY I got rid of the exception, but my animation did not work properly until I added its own Animated.Value like this const deltaY = useRef(new Animated.Value(0)).current;

To summerize:

  const deltaX = useRef(new Animated.Value(0)).current;
  const deltaY = useRef(new Animated.Value(0)).current;

        <Interactable.View
          ...
          animatedValueX={deltaX}
          animatedValueY={deltaY}
         ...

@27leaves
Copy link

Thank you. Also fixed for me to add the missing animatedValueX to the existing animatedValueY.

@anhtuank7c
Copy link

Thank you so much. In my case, I just use animatedValueY, added animatedValueX and it resolve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants