diff --git a/packages/core/src/BaseRouter.tsx b/packages/core/src/BaseRouter.tsx index 28dd3865..58d4dcec 100644 --- a/packages/core/src/BaseRouter.tsx +++ b/packages/core/src/BaseRouter.tsx @@ -78,10 +78,6 @@ const BaseRouter = { shouldActionChangeFocus(action: CommonAction) { return action.type === 'NAVIGATE'; }, - - canGoBack() { - return false; - }, }; export default BaseRouter; diff --git a/packages/routers/src/TabRouter.tsx b/packages/routers/src/TabRouter.tsx index e40f7b6d..66c29b12 100644 --- a/packages/routers/src/TabRouter.tsx +++ b/packages/routers/src/TabRouter.tsx @@ -211,6 +211,10 @@ export default function TabRouter({ return action.type === 'NAVIGATE'; }, + canGoBack(state) { + return router.getStateForAction(state, { type: 'GO_BACK' }) !== null; + }, + actionCreators: TabActions, };