react-navigation icon indicating copy to clipboard operation
react-navigation copied to clipboard

[Expo-Linking] Can't receive params when the application already opened.

Open HVHMobileDeveloper opened this issue 5 years ago • 6 comments

Current Behavior

  • When I closed the app it's open the screen and received the params, so when The app already opened it's can't receive any params.

Expected Behavior

  • able to received the params when the app already opened.

How to reproduce

  • the example code in the navigation configure :

  • const linking = { prefixes: [rootUrl], config: appLinkConfigure, }; with the appLinkConfigure is:

  • const appLinkConfigure = { screens: { [MY_SCREEN_NAME]: { path: ${MY_PATH}/:slug, parse: { slug: (slug) => ${slug}, }, }, }, };

  • "@react-navigation/native": "5.7.2", "@react-navigation/stack": "5.8.0", "expo-linking": "~2.0.1".

Environment

  • Expo SDK 40
software version
iOS or Android
@react-navigation/native
react-native
expo
node
npm or yarn

HVHMobileDeveloper avatar Mar 13 '21 11:03 HVHMobileDeveloper

The versions mentioned in the issue for the following packages differ from the latest versions on npm:

  • @react-navigation/native (found: 5.7.2, latest: 5.9.3)
  • @react-navigation/stack (found: 5.8.0, latest: 5.14.3)

Can you verify that the issue still exists after upgrading to the latest versions of these packages?

github-actions[bot] avatar Mar 13 '21 11:03 github-actions[bot]

I don't see any implementation in your code to handle receiving a deep link when the app is opened? Do you have more code to share? Otherwise I would suggest you read the expo deep linking documentation or the react navigation deep linking documentation and implement that.

Svarto avatar Mar 21 '21 07:03 Svarto

@Svarto I don't see any mention in the react-navigation documentation of having to code how to handle navigation when the app is open. The expo guide mentions Linking.addEventListener('url', callback) and Linking.getInitialUR but it's unclear if that should be used when you are using the linking prop of . There is also no use of Linking in the example repo.

Victor-Jansson avatar Apr 03 '21 17:04 Victor-Jansson

React Navigation 5 is no longer supported. Please upgrade to the latest version and open an issue if you're still facing problems.

satya164 avatar Oct 25 '26 19:10 satya164

Hey @HVHMobileDeveloper! Thanks for opening the issue. It seems that the issue doesn't contain a link to a repro, or the provided repro is not valid (e.g. broken link, private repo, code doesn't run etc.).

The best way to get attention to your issue is to provide an easy way for a developer to reproduce the issue.

You can provide a repro using any of the following:

Try to keep the repro as small as possible by narrowing down the minimal amount of code needed to reproduce the issue. See "How to create a Minimal, Reproducible Example" for more information.

Don't:

  • Link to your entire project or a project containing code unrelated to the issue.
  • Link to a specific file in a GitHub repo, as it won't be detected.

You can edit your original issue to include a link to the repro, or leave it as a comment. The issue will be closed automatically after a while if you don't provide a valid repro.

github-actions[bot] avatar Oct 25 '26 19:10 github-actions[bot]

Hey! This issue is closed and isn't watched by the core team. You are welcome to discuss the issue with others in this thread, but if you think this issue is still valid and needs to be tracked, please open a new issue with a repro.

github-actions[bot] avatar Oct 25 '26 19:10 github-actions[bot]