effector / effector/router

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

Open Beginner friendly
#75 0 comments 0 reactions 0 assignees View on GitHub
scope:react-native
Dominant language
TypeScript
Stars
8
Forks
2
Avg merge
13h 44m
Merged PRs (30d)
1

Description

### 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.

Contributor guide

Open the contributing guide

Research direction

Start at the exported StackNavigatorConfig and BottomTabsNavigatorConfig types, then compare their screenOptions declarations with the documented Bottom Tabs callback example and the createBottomTabsNavigator entry point. Verify the public types accept both static options and route/state callbacks, and type-check a reproduction using the documented form.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.