How to specify the order of screens in a tab layout? #47
-
How do you set the tab order in the demo app example? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
check file import { Tabs } from "expo-router";
export default Tabs; but this way automatically generated tabbars. if u need your own order, u need listed it in import { Tabs } from "expo-router";
export default function Layout1() {
return (
<Tabs>
<Tabs.Screen name="settings" />
<Tabs.Screen name="index" />
</Tabs>
);
}
import { Tabs } from "expo-router";
export default function Layout1() {
return (
<Tabs>
<Tabs.Screen name="settings" />
</Tabs>
);
} |
Beta Was this translation helpful? Give feedback.
-
This behavior is currently outlined in the docs https://expo.github.io/router/docs/features/options open to PRs adding algolia search to the docs. |
Beta Was this translation helpful? Give feedback.
-
Thank you |
Beta Was this translation helpful? Give feedback.
check file
app/(root)/(tab).js
u can only export
Tabs
, like this:but this way automatically generated tabbars. if u need your own order, u need listed it in
<Tabs>
component, like:settings
first,index
last. but u not need listed all other tabs, because expo-router listed it automatically. finnaly, all u need to set specific tab first is just: