ionic-team / ionic-team/ionic-docs

React: IonTabButton cannot be wrapped for use with IonTabBar

Đang mở
#2,099 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
triage
Ngôn ngữ chính
MDX
Star
621
Fork
3.2k
Merge trung bình
1 ngày 2 giờ
Pull request đã merge (30 ngày)
86

Mô tả

**URL**
https://ionicframework.com/docs/api/tab-bar

**What is missing or inaccurate about the content on this page?**

It seems that `IonTabButton` cannot be wrapped in another component; `IonTabBar` won't recognize it.

This should be noted in the documentation.

**Background**

My app puts the `IonTabButton` in a different order depending on whether the user is right-handed or left-handed.

Example of code that doesn't work (tabs are not displayed):

```
return (

{children}





```

And here is a wrapper component:

```
const TabButtonHelp: React.VFC = () => (



Help


);
```

This does work:

```
return (

{children}




Help




```

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.