ionic-team / ionic-team/ionic-framework

bug: vue and react routing integrations always pop when forward button is pressed

Đang mở
#23,454 13 bình luận 4 reaction 0 người được giao Xem trên GitHub
package: react package: vue type: bug
Ngôn ngữ chính
TypeScript
Star
52.7k
Fork
13.3k
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
51

Mô tả

# Bug Report

**Ionic version:**

[ ] **4.x**
[x] **5.x**

**Current behavior:**

If I press back button and press forward button the url is correct but the page is wrong

**Expected behavior:**

it should display correct page

**Steps to reproduce:**

**Related code:**

App component
```
const App: React.FC = () => (











);
```

PageOne component
```
const PageOne = ({ history }) => {
return (


This is Page One!


history.push('/pagetwo')}>
Go to page two



)
}
```

PageTwo component
```
const PageTwo = ({ history }) => {
return (


This is Page Two!


history.push('/pagethree')}>
Go to page three



)
}
```

**Other information:**

Example:

https://www.loom.com/share/048952f5848f443a8e108f52906e0ba4

Question:

1. Based on the Ionic component doc, we need to use `href` in `IonButton` in order to go to a page which does not render page transition animation (I assume it just updates the location.href). But I can also use `routerLink` to go to a page with page transition. Which is recommended?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.