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

Is there a way of using <ReactCSSTransitionGroup/> with the <UIView/> to animate transitions? #13

Closed
uditalias opened this issue Nov 28, 2016 · 2 comments

Comments

@uditalias
Copy link

When wrapping the <UIView/> with <ReactCSSTransitionGroup/> the animation is not taking place, I think its related to the fact that when transitioning between states, the <UIView/> is not rerendered, only its children.
Any way to animate transitions?

@uditalias
Copy link
Author

uditalias commented Nov 28, 2016

I created a PR with a solution here #14

@elboman
Copy link
Member

elboman commented Jan 10, 2017

I've been thinking about this, and even if I'd like to support ReactCSSTransitionGroup, I'm afraid it's not that simple. I'd like to find a solution that might work for other libs such as react-motion.

Unfortunately, as you already said, it's the UIView in charge of mounting the state components, so unless we want to explicitly support every animation/wrapper lib that might be useful for users, we might need to add a new API to customize the rendering done by UIView.

Something along the lines of react-router render prop:

<UIRouter plugins={[•••]} states={[•••]}>
  <UIView render={(Component, props) =>
    <SomeWrapperYouMightNeed><Component {...props} /></SomeWrapperYouMightNeed>
  } />
</UIRouter>

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

2 participants