You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I cannot seem to set the root Stacks header title from inside search-step1.
Thanks in advance.
After some debugging I have found that the id of the parent stack is the empty String "".
I tried using:
<Stack.Screen name="" options... />
This name gets passed to the useNavigation hook inside the expo-router Screen component. useNavigation is supposed to normalizer the id and fetch&return the closest parent with said id. However it contains the following:
would allow the empty string to pass and seems to fix my issue.
I would prefer however to just give the RootStack a fixed id like:
<Stack id="root" /> // or id="/" to make it work with relative paths
// in Screen component
<Stack.Screen name="root" options={{title: 'My Title'}} /> // or name="../../"
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have the following setup:
I cannot seem to set the root Stacks header title from inside search-step1.
Thanks in advance.
After some debugging I have found that the
id
of the parent stack is the empty String""
.I tried using:
This
name
gets passed to theuseNavigation
hook inside the expo-routerScreen
component.useNavigation
is supposed to normalizer the id and fetch&return the closest parent with said id. However it contains the following:This will return null when receiving the empty string thus not finding a parent.
Replacing this with:
would allow the empty string to pass and seems to fix my issue.
I would prefer however to just give the RootStack a fixed id like:
Beta Was this translation helpful? Give feedback.
All reactions