Skip to content

[Bug]: React Native screenOptions types reject documented dynamic callbacks #75

Description

@sergeysova

Package

@effector/router-react-native

What happened?

The StackNavigatorConfig and BottomTabsNavigatorConfig types declare screenOptions as a static options object. React Navigation also supports a callback that receives route and navigation state, and the Bottom Tabs documentation in this repository demonstrates that callback form.

The documented example therefore does not type-check through the exported React Native navigator configuration.

Reproduction

  1. Call createBottomTabsNavigator with a screenOptions function that receives the route and returns tab options.
  2. Type-check the application using the exported BottomTabsNavigatorConfig.
  3. Observe that the callback is rejected because screenOptions only accepts BottomTabNavigationOptions.

Expected: the binding accepts the same static and callback screenOptions forms as the underlying React Navigation navigator.
Actual: the public type is narrower than both React Navigation and the package documentation.

Environment

  • @effector/router-react-native: 1.0.1
  • @effector/router: 1.1.1
  • React: 18 or 19
  • React Native: >=0.70
  • React Navigation: >=6
  • TypeScript: 5.8.x
  • Node.js: 24.x

Logs / screenshots

Not applicable; this is a public type contract mismatch.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions