Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Warn when users have multiple stateful navigation containers (#3819)
* First pass at warning when users explicitly render nested navigators * Clean up tests around warnings * Update comment * Update comment again
- Loading branch information
1 parent
b7c6d07
commit 68a2a10
Showing
5 changed files
with
143 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/__tests__/__snapshots__/NavigationContainer-test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,13 @@ | |||
// Jest Snapshot v1, https://goo.gl/fbAQLP | |||
|
|||
exports[`NavigationContainer warnings detached navigators warns when you render more than one navigator explicitly 1`] = ` | |||
Object { | |||
"console": [MockFunction] { | |||
"calls": Array [ | |||
Array [ | |||
"You should only render one navigator explicitly in your app, and other navigators should by rendered by including them in that navigator. Full details at: https://v2.reactnavigation.org/docs/common-mistakes.html#explicitly-rendering-more-than-one-navigator", | |||
], | |||
], | |||
}, | |||
} | |||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,3 @@ | |||
export default function docsUrl(path) { | |||
return `https://v2.reactnavigation.org/docs/${path}`; | |||
} |