Fix perf issue on web - restore pop behaviour to tabs (#8620)

This commit is contained in:
Samuel Newman
2025-07-15 07:48:24 +03:00
committed by GitHub
parent 1f82b1d557
commit 4ccbae7c30
5 changed files with 22 additions and 13 deletions
+8
View File
@@ -7,6 +7,8 @@ import {type NavigationProp} from '#/lib/routes/types'
export type DebouncedNavigationProp = Pick<
NavigationProp,
| 'popToTop'
| 'popTo'
| 'pop'
| 'push'
| 'navigate'
| 'canGoBack'
@@ -38,6 +40,12 @@ export function useNavigationDeduped() {
popToTop: () => {
dedupe(() => navigation.popToTop())
},
popTo: (...args: Parameters<typeof navigation.popTo>) => {
dedupe(() => navigation.popTo(...args))
},
pop: (...args: Parameters<typeof navigation.pop>) => {
dedupe(() => navigation.pop(...args))
},
goBack: () => {
dedupe(() => navigation.goBack())
},