Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Router types #5263

Merged
merged 6 commits into from
Sep 23, 2024
Merged

Router types #5263

merged 6 commits into from
Sep 23, 2024

Conversation

swansontec
Copy link
Contributor

@swansontec swansontec commented Sep 19, 2024

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

@swansontec swansontec force-pushed the william/router-types branch 2 times, most recently from afd92b4 to a0234f7 Compare September 19, 2024 17:30
navigation: NavigationProp<'pluginView' | 'pluginViewBuy' | 'pluginViewSell'>

// Work around an extremely strange & hard-to-debug type error:
route: any // RouteProp<'pluginView' | 'pluginViewBuy' | 'pluginViewSell'>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird. I tried to debug as well but couldn't resolve it.

Since there is only one scene in this stack, why do we even need it?
With this change, we now verify that the scenes inside a router match what the router expects. This also gives us type checking for when we navigate to a scene nested within a router.

Unfortunately, we still have the `NavigationBase` type in the app which doesn't properly distinguish between the different types of navigation objects and their varying capabilities. This needs to be fixed.
@swansontec swansontec merged commit 468194f into develop Sep 23, 2024
2 checks passed
@swansontec swansontec deleted the william/router-types branch September 23, 2024 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants