Skip to content

How can I dynamically go to different initial page by deeplink ? #1060

@markzhai

Description

@markzhai

Version

Tell us which versions you are using:

  • react-native-router-flux v3.31.1
  • react-native v0.31

How can I dynamically go to different initial page by deeplink ?
Say like, I have stayapp://bloc and stayapp://card, and I want to navigate to different page as the initial scene in the same component entry using the link.

Currently,

      var url = Linking.getInitialURL().then((url) => {
        if (url) {
          console.log('Initial url is: ' + url);
        }
      }).catch(err => console.error('An error occurred', err));

If I use Linking, I can only use Action to navigator in the callback and cannot realize the effect I want (as there was already a page in stack).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions