ionic-team / ionic-team/ionic-docs

React: IonTabButton cannot be wrapped for use with IonTabBar

未关闭
#2,099 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
triage
主要语言
MDX
星标
621
派生
3.2k
平均合并
1 天 2 小时
30 天内合并 PR
86

描述

**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




```

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。