bug: Ionic React page transitions not working with history.push
See original GitHub issuePrerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
- v4.x
- v5.x
- v6.x
- Nightly
Current Behavior
When transitioning between pages, it appears that the pages transition by sliding upward rather than coming in from the right.
Expected Behavior
Two <Route>
components in an <IonRouterOutlet>
should transition from left to right using useHistory().push()
Steps to Reproduce
Please see the codesandbox URL.
<IonApp>
<IonReactRouter >
<IonRouterOutlet animated >
<Route exact path="/page1" >
<Page1 />
</Route>
<Route exact path="/page2">
<Page2 />
</Route>
<Route exact path="/">
<Redirect to="/page1" />
</Route>
</IonRouterOutlet>
</IonReactRouter>
</IonApp>
Code Reproduction URL
https://codesandbox.io/s/ionic6-react-typescript-page-transitions-veifn6?file=/src/App.tsx
Ionic Info
Ionic:
Ionic CLI : 6.20.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/react 6.1.15
Capacitor:
Capacitor CLI : 3.6.0
@capacitor/android : not installed
@capacitor/core : 3.6.0
@capacitor/ios : not installed
Utility:
cordova-res : not installed globally
native-run : 1.6.0
System:
NodeJS : v16.13.0 (/usr/local/bin/node)
npm : 8.14.0
OS : macOS Monterey
Additional Information
No response
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
bug: Ionic 4 / React history.push() is not changing pages · ...
Current behavior: history.push does not change pages. I believe <IonRouterOutlet> is not working, because the kitchen sink React Ionic demo ...
Read more >ionic react push to component transition issue
I am developing an app with ionic/react and need to push to new component hence doing it by this.props.history.push({ pathname: ...
Read more >Ionic-react - so many render issues related to routing
This is a very general question, but I'm wondering if there's someone actively working on the Ionic-React library?
Read more >Routing, programmatically in Ionic React
push () This method allows us to push a route into the history of the router. ... all routes and pages/tabs and main...
Read more >IonRouterOulet does not apply page transition in ios. Ionic ...
Coding example for the question IonRouterOulet does not apply page transition in ios. Ionic React-Reactjs.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you for the help!
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.