IjzerenHein / react-navigation-magic-move

Bindings for using react-navigation with react-native-magic-move 🐰🎩✨
MIT License
136 stars 5 forks source link

Animation only shown when navigating back after adding import statement #3

Closed thijs-qv closed 5 years ago

thijs-qv commented 5 years ago

Actual behaviour

When adding import "react-navigation-magic-move"; the animation is shown when navigating back to the previous MagicMove.Scene, but the animation when navigating to a new MagicMove.Scene is not shown anymore. Without adding the import statement, the animation is showing correctly when navigating to another MagicMove.Scene, but not when navigating back.

Expected behaviour

Animation should be shown when navigating to new MagicMove.Scene as well as when going back to the previous MagicMove.Scene.

I'm seeing this behaviour on

Really cool library, by the way!

IjzerenHein commented 5 years ago

How does your navigation setup look like Are you using a stack-navigator, tab-navigator, switch-navigator. Please elaborate on your setup.

thijs-qv commented 5 years ago

I am using a tab navigator, which contains a stack navigator. I am trying to show the animation when navigating between two screens of the stack navigator.

IjzerenHein commented 5 years ago

Alright, that should indeed just work. Can you enable the debug prop on the magic-move Scene and Components? This will log out a lot of information that is very useful. Please reply with the log information if you can't figure it out yourselves. Cheers

thijs-qv commented 5 years ago

Thanks for the help, I figured it out. I wrapped the MagicMove.Image and the MagicMove.Text components in a View, which itself was wrapped in a conditional. This was what caused the issue.

IjzerenHein commented 5 years ago

Sweet, glad that's resolved :)