question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

docs issue activityState can't be 1?

See original GitHub issue

According to the documentation the <Screen /> component can have an activityState of 0, 1 or 2.

“When activityState is set to 0, the parent container will detach its views from the native view hierarchy. When activityState is set to 1, the Screen will stay attached, but on iOS it will not respond to touches. We only want to set activityState to 1 for during the transition or e.g. for modal presentation, where the previous screen should be visible, but not interactive. When activityState is set to 2, the views will be attached and will respond to touches as long as the parent container is attached too.”

But when I look in the source code this is the style being applied to the parent <View />

<View
        style={[
          style,
          ENABLE_SCREENS && enabled && activityState !== 2
            ? { display: 'none' }
            : null,
        ]}
        {...rest}
/>

So it seems like there’s a mistake in the docs, or have I misunderstood something?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
wedelgaardcommented, Apr 14, 2021

Thx I think can be closed 😃

0reactions
WoLewickicommented, Apr 2, 2021

The code in index.tsx has been changed to properly behave with activityState. It will now only detach the screen if the activityState === 0. As I mentioned before, since there is index.native.tsx, the index.tsx was only used on web, but react-navigation had its own implementation there. Since react-navigation v6, this file will probably be used. Can I help you any more with this or can I close this issue @wedelgaard ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Activity diagram - No Magic Documentation
An Activity diagram falls under the behavioral diagramming family. An Activity diagram is a variation of a State Machine.
Read more >
UML 2 Tutorial - Activity Diagram - Sparx Systems
In UML, an activity diagram is used to display the sequence of activities. ... A control flow shows the flow of control from...
Read more >
Activity | Android Developers
There can be one or multiple activity stacks visible on screen. An activity has essentially four states: If an activity is in the...
Read more >
UML Activity Diagram Tutorial - Lucidchart
The Ultimate Guide to Activity Diagrams in UML - Includes a general overview, common benefits of using one, basic components, standard symbols, examples, ......
Read more >
Unified Modeling Language (UML) | Activity Diagrams
UML-State-Diagram Figure – notation for initial state or start state A process can have only one initial state unless we are depicting ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found