Skip to content

Commit 7739cf7

Browse files
committed
docs(tabs): add comment
1 parent ddf07ff commit 7739cf7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/react/src/components/navigation/IonTabs.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ interface Props extends LocalJSX.IonTabs {
4545
export const IonTabs = /*@__PURE__*/ (() =>
4646
class extends React.Component<Props> {
4747
context!: React.ContextType<typeof NavContext>;
48+
/**
49+
* `routerOutletRef` allows users to add a `ref` to `IonRouterOutlet`.
50+
* Without this, `ref.current` will be `undefined` in the user's app,
51+
* breaking their ability to access the `IonRouterOutlet` instance.
52+
* Do not remove this ref.
53+
*/
4854
routerOutletRef: React.Ref<HTMLIonRouterOutletElement> = React.createRef();
4955
selectTabHandler?: (tag: string) => boolean;
5056
tabBarRef = React.createRef<any>();

0 commit comments

Comments
 (0)