Skip to content

Commit e919c4f

Browse files
committed
Add replace helper
1 parent 0aec010 commit e919c4f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/NavigationService.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,10 @@ export const reset = (params: any) => {
100100
navigationRef.current?.reset(params);
101101
}
102102
};
103+
104+
export const replace = (params: any) => {
105+
if (isReadyRef.current && navigationRef && navigationRef.current) {
106+
// Perform navigation if the app has mounted
107+
navigationRef.current?.replace(params);
108+
}
109+
};

0 commit comments

Comments
 (0)