mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-04-24 04:25:34 +08:00
fix: default to backBehavior: firstRoute for TabRouter
BREAKING CHANGE: Returning to first route after pressing back seems more common in apps. This commit changes the default for tab and drawer navigators to follow this common practice. To preserve previous behavior, you can pass backBehavior=history to tab and drawer navigators.
This commit is contained in:
@@ -147,5 +147,7 @@ it('integrates with the history API', () => {
|
||||
|
||||
act(() => navigation.current?.navigate('Home'));
|
||||
|
||||
jest.runAllTimers();
|
||||
|
||||
expect(window.location.pathname).toBe('/edit');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user