Skip to content
This repository was archived by the owner on Aug 8, 2024. It is now read-only.
This repository was archived by the owner on Aug 8, 2024. It is now read-only.

how to send navigation events between peer navigators? #78

@matthargett

Description

@matthargett

We have a main screen with a tab navigator, and a pulldown sheet that also has a tab navigator. The navigators are peers/siblings in the top-level App.js.

image

In this example, the user gets a chat message in the pulldown sheet that contains a link (green triangle) that triggers a navigation in the main screen's tab navigator. Conversely, the main window can contain content (blue square link) that triggers a navigation in the pulldown sheet's tab navigator.

Some ideas we have thought about

  1. Using a ref, as documented here: https://reactnavigation.org/docs/en/navigating-without-navigation-prop.html
  2. Opening a deep link on our own app, which also helps e2e test automation a bit, but potentially creates security issues.
  3. Writing a custom navigator, which we don't want to do if we can help it due to the maintenance burden.
  4. Don't use react-navigation for the pulldown sheet, and use a custom (re)Animated and native navigation solution. We really don't want to do this if we can help it due to the maintenance burden, and losing the herd immunity of community-hardened code in react-nav.

This seems possible given all the atoms available in react-nav and animted-bottom-sheet, but we're not sure what the right thing to do is that will have good looking transitions and perform well on lower-end Android.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions