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

fix(iOS): do not force API user to set activityState #2406

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

kkafar
Copy link
Member

@kkafar kkafar commented Oct 15, 2024

Description

We did not set default value of activityState on iOS. It was set to 0 by default int initializer.

In Screen component native spec we set it to -1, however this had no impact, because the value setter
setActivityStateOrNil: filtered out the -1 value.

TODO:

  1. Verify that change in default value do not break any other navigator!

^ Looks like this will work, because navigators such as bottom tabs always set the activity state explicitly.

This is a problem, because now, after adding preload support #2389 we filter out screens with activityState == 0 in native stack.
Therefore, we now unintentionally force our API user to always set desired activityState.

Fixes #2405

Changes

Set activityState to -1 by default on native side.

Test code and steps to reproduce

Just render screen inside native-stack w/o activityState set. It won't be shown.

Checklist

  • Included code example that can be used to test this change
  • Ensured that CI passes

@kkafar kkafar merged commit 384a99e into main Oct 15, 2024
5 checks passed
@kkafar kkafar deleted the @kkafar/blank-screen-due-to-preload branch October 15, 2024 11:53
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.

Blank screen on iOS when using react-navigation/native-stack
2 participants