Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add optional screens per navigator #8805

Merged
merged 16 commits into from
Oct 23, 2020
Merged

Conversation

WoLewicki
Copy link
Member

@WoLewicki WoLewicki commented Sep 4, 2020

Changes done here will work properly with software-mansion/react-native-screens#624 merged and released. The documentation of detachInactiveScreens and detachPreviousScreen props should also be added.

New things:

  • detachInactiveScreens - prop for all navigators that can be switched by the user. It controls if the react-native-screens are used by the navigator.
  • detachPreviousScreen - a prop that tells if the previous screen should stay active after the transition. It can be set by the user, defaults to true for normal mode, and true for mode = “modal”.

@netlify
Copy link

netlify bot commented Sep 4, 2020

Deploy preview for react-navigation-example ready!

Built with commit cf60b79

https://deploy-preview-8805--react-navigation-example.netlify.app

@github-actions
Copy link

github-actions bot commented Sep 4, 2020

The Expo app for the example from this branch is ready!

expo.io/@react-navigation/react-navigation-example?release-channel=pr-8805

@codecov-io
Copy link

codecov-io commented Oct 8, 2020

Codecov Report

Merging #8805 into main will decrease coverage by 0.39%.
The diff coverage is 39.02%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #8805      +/-   ##
==========================================
- Coverage   74.50%   74.10%   -0.40%     
==========================================
  Files         131      131              
  Lines        3204     3236      +32     
  Branches      967      982      +15     
==========================================
+ Hits         2387     2398      +11     
- Misses        715      734      +19     
- Partials      102      104       +2     
Impacted Files Coverage Δ
...ages/bottom-tabs/src/views/ResourceSavingScene.tsx 43.75% <0.00%> (-14.59%) ⬇️
packages/drawer/src/views/ResourceSavingScene.tsx 43.75% <0.00%> (-14.59%) ⬇️
packages/stack/src/views/Screens.tsx 57.89% <42.85%> (-4.61%) ⬇️
packages/bottom-tabs/src/views/BottomTabView.tsx 92.30% <50.00%> (-3.70%) ⬇️
packages/stack/src/views/Stack/CardStack.tsx 77.07% <52.38%> (-4.09%) ⬇️
packages/drawer/src/views/DrawerView.tsx 82.45% <100.00%> (+0.31%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c4bd68...3f550d8. Read the comment docs.

joshuapinter pushed a commit to cntral/react-navigation that referenced this pull request Sep 29, 2021
Changes done here will work properly with software-mansion/react-native-screens#624 merged and released. The documentation of `screensEnabled` and `activeLimit` props should also be added. It also enabled `Screens` in iOS stack-navigator by default.

New things:
- `detachInactiveScreens` - prop for navigators with `react-native-screens` integration that can be set by user. It controls if the `react-native-screens` are used by the navigator.
- `detachPreviousScreen` - option that tells to keep the previous screen active. It can be set by user, defaults to `true` for normal mode and `false` for the last screen for mode = “modal”.

Co-authored-by: Satyajit Sahoo <satyajit.happy@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants