This repository has been archived by the owner on Dec 10, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Having trouble applying motion-ui-pack to swapping components #72
Comments
@ajmajma did you solve this issue? |
I'm interested in that exact same issue as well. |
Hey, I had the same issue and ended up fixing it by wrapping a div around the component(s). Seems like it will only work with inline JSX using {condition && }. Give it a try and let me know if it helped you. 😄 Edit: Just tried it with a span aswell, and it worked fine so I guess any HTML element wrapping the component would work |
I have the exact same problem. Wrapping in a div solves it, though not when using |
I'm having the same issues. Using something like this:
instead of:
works for the component. Also I'm a bit confused why I need to pass in a key to get it working. Its just a single component. not a array of several components/elements. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello, I am trying to apply your module to add a little animation to my react app here. I have a little function that swaps the child component shown based on a local state variable and I can't seem to get it to work. So I just have -
inside of my render. The renderQuiz is just a function that has a switch statement that swaps the component shown based on a local component state in this wrapping parent component. For reference, it just looks like so -
The component swap fine but I am seeing no animation, there is about a 1 second pause between these components showing themselves though. I see you are passing style when you render components inside transition so inside I have style={this.props.style} on the outer most div (thinking this might be the problem) but I am still not seeing the animations. Would appreciate any help in fixing this. Thanks!!
The text was updated successfully, but these errors were encountered: