Skip to content

React.Strict breaks react-navigation Linking on Web #10988

Open
@floataboat

Description

@floataboat

Current behavior

Given a basic app generated via 'Create React App' with React-Navigation integrated does not support Linkage on Web. When running locally links do not work properly on page load. Whatever path is passed to the location bar is ignored, the first ( default ) route is loaded. Attached is a screen cast of the behavior.

Screen.Recording.2022-11-08.at.4.06.56.PM.mov

Expected behavior

I except the path provided in the location bar to be used for the initial navigation route.

I narrowed the issue down to <React.StrictMode/> This Component is incorporated in the Create React App template. Unwrapping the main app from that component fixes the issue. With it removed, the initial path is being used to load the initial route.

Reproduction

https://github.com/floataboat/cuddly-invention

Platform

  • Android
  • iOS
  • Web
  • Windows
  • MacOS

Packages

  • @react-navigation/​bottom-tabs
  • @react-navigation/​drawer
  • @react-navigation/​material-bottom-tabs
  • @react-navigation/​material-top-tabs
  • @react-navigation/​stack
  • @react-navigation/​native-stack

Environment

  • [] I've removed the packages that I don't use
package version
@react-navigation/native 6.0.13
@react-navigation/stack 6.3.4
@react-navigation/native-stack 6.9.1
node 19.0.1
yarn 1.22.19

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions