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:
Satyajit Sahoo
2020-12-02 21:06:32 +01:00
parent 7c1cd261bf
commit 8bdc6c6b9b
4 changed files with 40 additions and 30 deletions

View File

@@ -147,5 +147,7 @@ it('integrates with the history API', () => {
act(() => navigation.current?.navigate('Home'));
jest.runAllTimers();
expect(window.location.pathname).toBe('/edit');
});