You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which package manager are you using? (Yarn is recommended)
yarn
If the issue is web-related, please select the bundler (web.bundler in the app.json)
None
Summary
Stack.Screen options are according to expo-router types required to extend Record<string, any>. Whilst this is correct it also accepts a function which supplies the route and the closest navigation as params. Which makes certain things possible, such as this:
Which is very useful in nested navigators. Since the "canGoBack" prop might still be true but you might not want to show the back button.
Right now using this approach still works fine, its just the types that are incorrect. It would be nice if the types matches the functionality exposed here
Minimal reproducible example
https://github.com/ljukas/expo-router-bugs
Which package manager are you using? (Yarn is recommended)
yarn
If the issue is web-related, please select the bundler (
web.bundler
in theapp.json
)None
Summary
Stack.Screen
options are according to expo-router types required to extend Record<string, any>. Whilst this is correct it also accepts a function which supplies the route and the closest navigation as params. Which makes certain things possible, such as this:Which is very useful in nested navigators. Since the "canGoBack" prop might still be true but you might not want to show the back button.
Right now using this approach still works fine, its just the types that are incorrect. It would be nice if the types matches the functionality exposed here
Environment
expo-env-info 1.2.0 environment info:
System:
OS: macOS 14.4.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node
Yarn: 3.2.3 - /opt/homebrew/bin/yarn
npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm
Managers:
CocoaPods: 1.11.3 - /Users/lukas/.gem/ruby/3.1.3/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 23.4, iOS 17.4, macOS 14.4, tvOS 17.4, visionOS 1.1, watchOS 10.4
IDEs:
Android Studio: 2023.2 AI-232.10300.40.2321.11567975
Xcode: 15.3/15E204a - /usr/bin/xcodebuild
npmGlobalPackages:
eas-cli: 7.4.0
Expo Workflow: bare
The text was updated successfully, but these errors were encountered: