Skip to content
This repository has been archived by the owner on Dec 10, 2019. It is now read-only.

Animations not triggering #74

Open
ghost opened this issue May 2, 2017 · 3 comments
Open

Animations not triggering #74

ghost opened this issue May 2, 2017 · 3 comments

Comments

@ghost
Copy link

ghost commented May 2, 2017

Where should I look for clues on what could be the possible reason animations aren't triggering?

@souporserious
Copy link
Owner

Hmm weird, sorry about that. Can you provide any code snippets so I can help diagnose?

@ghost
Copy link
Author

ghost commented May 3, 2017

I was doing something like this:

import Transition from 'react-motion-ui-pack';
import { spring } from 'react-motion';
...

export class LoginModal extends React.Component {
  render() {
    return (
      <Transition
        component={false} // don't use a wrapping component
        enter={{ opacity: 1, translateY: spring(0, { stiffness: 400, damping: 10 }) }}
        leave={{ opacity: 0, translateY: 250 }}
      >
         { !this.props.isUserAuthenticated && <Overlay key="p">
         ...
         </Overlay>
         }
      </Transition>
    );
  }
}

where <Overlay /> is a component made with styled-components.

I remember react-motion-ui-pack working for a different project of mine, so it was weird why it wasn't working here.
Thanks for your hard work!

@mightym
Copy link

mightym commented Jul 25, 2017

Try wrapping your component into a div or some other el. I'm having the same issue. #74

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

No branches or pull requests

2 participants