Fix perf issue on web - restore pop behaviour to tabs (#8620)
This commit is contained in:
@@ -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())
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user