Allow 1-deep nested arrays of Scenes to support structured configuration for larger projects #2241
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For larger projects it is convenient to divide scenes configuration by modules. If the new module needs it's own navigator this is ok, but often you just want to configure some more screens for the existing top-level stack navigator. In v3 that was achievable via explicitly adding array of childrens of sub-module config:
This was ugly but workable solution. v4 throws exception for such trick and doesn't provide any alternative solution. This small change allows such trick and makes v4 more compatible with v3 configuration.
Better solution would be to introduce a new configuration node (may be call it
<Group></Group>
) to contain sub-module configuration without introducing new sub-navigator.P.S.: Unfortunately I'm unable to commit dist files because
npm run build
doesn't work for me (#2240). But I've tested this by altering dist code manually.