-
Notifications
You must be signed in to change notification settings - Fork 137
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
Different transition for routes #50
Comments
I am trying to do the same thing. What I think we really need to do is dynamically change the transition depending on which page you are coming from. Have you figured out how to do this? |
Finally I used this and modified AnimattedWrapper HOC to get style as parameter: It works nice. Last thing I need is to store previous route, but I didn't find a way to do that. |
In react router you can pass in a custom state. It was a bit tricky because you dont give it to the route, but to the link or history.push function. I gave all the elements in my tab a state.tabindex from 0-4. Then in the route transition I can check whether or not the previous tab is bigger or smaller, indicating the direction. The only issue now is that the location.state is undefined before you do any navigation. But for now I can assume that they start from the leftmost tab. I also have some routes that are not going to have a left to right transition, eg. subpages.
|
Did any of you manage to have slideLeft/Right in new 1.x version? |
@damianobarbati |
Hi, I'd like to use slideLeft/Right in my app, however I'd like to control which route uses which transition effect depending from where you access it.
Lets have four tabs A,B,C,D . Default is A.
From A to any other lets use slideLeft.
From B to C or D still slideLeft, but to A slideRight.
Now I'm using example from main 'wiki' of this repo:
I tried:
Renders only first Route
And:
Which works ok but feels redundant.
Is this the way to go?
The text was updated successfully, but these errors were encountered: