Reputation: 24874
I am using Expo Router for my React Native application. I am trying to navigate to a page within my app without any animations; in React Navigation, there is an option to set the animation, but seems like expo router hides this parameter. Is there a way to do this?
router.replace({
pathname: '/my-link',
params: {},
});
Upvotes: 1
Views: 12
Reputation: 1951
On your _layout.tsx
file you can have something like this
export default function Layout() {
return (
<Stack
screenOptions={{
animation: "none"
}}
>
<Stack.Screen name="screen1" />
<Stack.Screen name="screen2" />
</Stack>
);
}
Upvotes: 0