-
Notifications
You must be signed in to change notification settings - Fork 94
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
Animated transitions possible with back/forward buttons? #89
Comments
Have you seen this project? https://github.com/andreypopp/react-router-page-transition |
@STRML Yes, I saw that project and based my app's transitions on it. However, the native back and forward buttons don't trigger the animations for me. They also don't trigger the transitions in the http://andreypopp.github.io/react-router-page-transition/ example. Thanks for your prompt response! |
Yes - that code allows for a separate popState transition as animations on back/forward can get annoying. It is actually quite nice since you can set separate transitions on Using the code from the project, you can set the transitions on back/forward by specifying a
|
Hey guys! This is my CSS: .moveUp-enter {
-webkit-transform: translate3d(0,5%,0);
transition: all .4s;
opacity: 0.01;
}
.moveUp-enter.moveUp-enter-active {
-webkit-transform: translate3d(0,0,0);
opacity: 1;
}
.moveUp-leave {
transition: all 4s;
-webkit-transform: translate3d(0,0,0);
}
.moveUp-leave.moveUp-leave-active {
-webkit-transform: translate3d(0,-105%,0);
opacity: .01;
} The 4s is for debugging purpose. |
Looks like you're missing the full set of rules from styles.css, especially the There is more information in the React Docs for how this animation group works. Basically both elements are present in the DOM until React sees a |
I also tried with the exact same css on that file. I read the docs throughly, but when happens is the |
@STRML thanks so much for the explanation of the popStateTransitionName prop. It worked like a charm. @jenil27 Have you made sure that the |
@dbmzzo The page isn't in the DOM, it just goes out of the DOM within a few milliseconds when another page is entering. I have positioned the pages absolutely and copied the same animations from the styles.css. Still no luck :( |
@jenil27 any updates on your luck? Did you get this working if so how? |
Nope, didn't figure it out. Gave up. |
Hello,
The router component has been a great help to me, but I've run into an issue that I'm not sure can be solved.
I have transitions between locations using the AnimatedLocations component, and they work great when clicking a link made with the Link component.
However, I'd also like the transitions to occur when the user uses the back/forward buttons.
Is this possible, perhaps (though I've tried and failed) by overriding the popstate or hashchange methods to manually load a location using react-router-component?
Thanks so much for your hard work on a great tool.
The text was updated successfully, but these errors were encountered: