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

Transitions #15

Open
ChrisCinelli opened this issue Nov 2, 2015 · 11 comments · May be fixed by #86
Open

Transitions #15

ChrisCinelli opened this issue Nov 2, 2015 · 11 comments · May be fixed by #86

Comments

@ChrisCinelli
Copy link

ChrisCinelli commented Nov 2, 2015

Provide a mechanism to do smooth animated transitions to a different route.
Consider also the same route with different parameters. Ex: /user/123 to/user/124.
Ideally it can work with ReactCSSTransitionGroup

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/29560423-transitions?utm_campaign=plugin&utm_content=tracker%2F18115217&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F18115217&utm_medium=issues&utm_source=github).
@SeverS
Copy link

SeverS commented Jan 4, 2016

+1

1 similar comment
@puradox
Copy link

puradox commented Jan 23, 2016

+1

@ghost
Copy link

ghost commented Apr 13, 2016

+1

1 similar comment
@Edmondton
Copy link

👍

@frenzzy
Copy link
Member

frenzzy commented May 31, 2016

Are these examples useful to you?

@Edmondton
Copy link

@frenzzy - it does help. thanks. any possible way to include them in the README or in some form of documentation.

@koistya
Copy link
Member

koistya commented Jun 9, 2016

@sinnwell
Copy link

sinnwell commented Feb 28, 2017

I'm trying to make something similar work using react-addons-transition-group to be able to code custom animations. Unfortunately widthStyles(s)(Component) does not pass through componentWillEnter(callback) and componentWillLeave(callback). Any tips?
This did not help me:
kriasoft/react-starter-kit#909 (comment)

@SeverS
Copy link

SeverS commented Feb 28, 2017

@sinnwell can you provide a fiddle? if you tried that solution from the comment it should have worked... i assume that the problem is somewhere else...

@sinnwell
Copy link

sinnwell commented Mar 1, 2017

@SeverS

This is working. With ReactTransitionGroup.
https://jsfiddle.net/sinnwell/7u9tvrkb/13/

But using isomorphic-style-loader (copied the source and dependencies of withStyle)
https://jsfiddle.net/sinnwell/qqdatpj5/10/

The callback methods of the Animation component won't be called any longer.

@frenzzy
Copy link
Member

frenzzy commented Mar 2, 2017

Do not use any higher order components with ReactTransitionGroup, for example you can manually apply styles for your animation component:

import React from 'react';
import s from './your.css';

class Animation extends React.Component {
  static contextTypes = {
    insertCss: PropTypes.func,
  };

  componentWillMount() {
    this.removeCss = this.context.insertCss.apply(undefined, s);
  }

  componentWillUnmount() {
    setTimeout(this.removeCss, 0);
  }
  // ...
}

Or you can read discussion here: reduxjs/react-redux#303

@frenzzy frenzzy linked a pull request Mar 26, 2017 that will close this issue
20 tasks
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.

7 participants