ionic-team / ionic-team/ionic-docs
React: IonTabButton cannot be wrapped for use with IonTabBar
- Lingua principale
- MDX
- Stelle
- 621
- Fork
- 3.2k
- Merge medio
- 1g 2h
- PR unite (30g)
- 86
Descrizione
**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
```
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start with the IonTabBar documentation at https://ionicframework.com/docs/api/tab-bar and review how IonTabButton usage is described. Document that wrapping IonTabButton in another component prevents IonTabBar from recognizing it, using the reported wrapper example; done when the limitation is clear to readers.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- react
- Ambito
- documentation
- Tipo di issue
- Documentazione
- Difficoltà
- 1/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100