Which package manager are you using? (Yarn is recommended)
yarn
Summary
I'm encountering an issue with expo-router@2 when using custom screen options. The problem arises when navigating between identical routes, e.g. from /[id] to /[id].
export default function Layout() {
return (
<Stack>
{/* if you uncomment following tag it will break the default behavior: */}
{/* <Stack.Screen
name="[id]"
options={{
title: "title",
}}
/> */}
</Stack>
);
}
Minimal reproducible example
I can't create Expo Snack, because it only allows to create a Snack for SDK<=48, but expo-router@2 is only available in SDK 49, so I put a minimal reproducible example in this repository.
Which package manager are you using? (Yarn is recommended)
yarn
Summary
I'm encountering an issue with expo-router@2 when using custom screen options. The problem arises when navigating between identical routes, e.g. from /[id] to /[id].
Without custom screen options
With custom screen options
/index.js
/[id].js
/_layout.js:
Minimal reproducible example
I can't create Expo Snack, because it only allows to create a Snack for SDK<=48, but expo-router@2 is only available in SDK 49, so I put a minimal reproducible example in this repository.