Skip to content

Navigation preset: useLinkProps role, usePreventRemoveContext and useAnimatedHeaderHeight differ from React Navigation 7 #828

Closed

Description

@danfry1

The navigation preset (presets/navigation.ts) still differs from the API React Navigation 7 declares in four places. The mock conformance probe waives each one and names this issue. They were split out of #712 because fixing them changes what the preset returns today, or needs a React Native Animated value inside the preset.

  • useLinkProps() returns accessibilityRole: "link". @react-navigation/native 7.5 returns role: "link" instead. Switching changes the props a link renders with, so snapshots that include them change.
  • usePreventRemoveContext() returns null. The library declares an object.
  • useAnimatedHeaderHeight from @react-navigation/native-stack is missing. The library returns an Animated interpolation and throws outside a native stack screen. The preset has no Animated value to return yet; useTransitionProgress in Screens preset: useTransitionProgress returns numbers, and Tabs and the feature and compatibility flags are missing #717 needs the same.
  • useNavigationBuilder().navigation lacks emit. A navigator's helpers have it, but a screen's navigation does not, and the preset returns useNavigation()'s object for both. Giving the builder its own helpers object changes its identity, which tests can observe.

Activity

  1. added this to the 0.16.0 milestone on Nov 14, 2026
  2. added
    bug
    area:presets
    priority:medium
    on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:presetsbugpriority:medium

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions