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

Alternative approach to react-native-screens Android bug #1301

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions versioned_docs/version-6.x/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@ import android.os.Bundle;

This change is required to avoid crashes related to View state being not persisted consistently across Activity restarts.

#### Alternative approach

The above fix removes all state from the app which for some products might not be the best behaviour. To work around this you can turn off react-native-screens for Android only using the code below

```js
enableScreens(Platform.select({ android: false, ios: true })
```

:::info

When you use a navigator (such as stack navigator), you'll need to follow the installation instructions of that navigator for any additional dependencies. If you're getting an error "Unable to resolve module", you need to install that module in your project.
Expand Down
Loading