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

Setting a Route without Triggering the Router #26

Open
Ben-G opened this issue May 12, 2016 · 0 comments
Open

Setting a Route without Triggering the Router #26

Ben-G opened this issue May 12, 2016 · 0 comments

Comments

@Ben-G
Copy link
Member

Ben-G commented May 12, 2016

In some cases, when UIKit performs a transition that we cannot force through the router, we need to notify the router about the change (also discussed in #17).

In such cases we might want to update the route, without triggering the actual routing. If the transition already happened directly from within UIKit we don't want to trigger another action in the router.

We'll need to add this to the API of the router in form of a new action. Maybe we could call it NotifyOfNewRoute(route).

mjarvis pushed a commit that referenced this issue Dec 13, 2016
Necessary for mutating route specific data without causing navigation changes.
The desired usage here would be that `oldState.map { $0.instanceIdentifier } == newState.map { $0.instanceIdentifier}`, and has significant side effects (described below) if not the case.

Note this carries a risk of having unintended effects if the user uses this incorrectly as it could cause the UI & navigationState to go out-of-sync if one changes the actual segments in the route.

However, the above side effect also Fixes #26, in that one can use this to react to UIKit based changes to the route. (IE system UINavigationBar back button)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant