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

An option to make Animatable Components not animate on mount #186

Open
AlicanC opened this issue Apr 16, 2018 · 2 comments · May be fixed by #226
Open

An option to make Animatable Components not animate on mount #186

AlicanC opened this issue Apr 16, 2018 · 2 comments · May be fixed by #226

Comments

@AlicanC
Copy link

AlicanC commented Apr 16, 2018

I have something like this:

const MyComponent = ({ isShown }) => (
  <Animatable.View
    animation={isShown ? 'fadeInUp' : 'fadeOutDown'}
  >
    <ContentHere />
  </Animatable.View>
);

The goal here is to make MyComponent show and hide itself according to the isShown prop. The problem is that Animatable.View animates when it's mounted so when I render <MyComponent isShown={false}> the user sees the component appear and fade out.

Could we add a prop to Animatable Components to make them initially render a completed animation (in this example, a completed fadeOutDown) so they don't animate on mount, but only when animation prop changes?

@humbertouchiyama humbertouchiyama linked a pull request Nov 9, 2018 that will close this issue
@teod
Copy link

teod commented Jun 25, 2020

What's the status for this ticket ? this looks like a common use-case when using animatable library.

@RoliqueTeam
Copy link

Any updates here?

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

Successfully merging a pull request may close this issue.

3 participants