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

OPTIONALLY better handling of routing when stop is called from a trigger (stop() generates current behaviour; stop(true) generates the new behaviour) #681

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

convexset
Copy link

@convexset convexset commented Aug 16, 2016

OPTIONALLY better handling of routing when stop is called from a trigger (both triggersEnter and triggersExit). Original behaviour of FlowRouter is preserved.

Addresses issues like: #491

stop has to be called with one argument (with value true; defaults to false, which generates the original behaviour)

With this tweak, triggersExit fires again after another exit attempt.

Using stop(true) in triggersExit results in a duplicate entry in the user's history will be created in the "next" slot. This is arguably a small price to pay for triggersExit firing again (on routing) after a stop.

Using stop(true) in triggersEnter results in a new entry in the user's history in the "next" slot for the route for which entry was stopped.

…ger (both triggersEnter and triggersExit). Original behaviour of FlowRouter is preserved.

stop has to be called with one argument (with value true; defaults to false, which generates the original behaviour)

With this tweak, triggersExit fires again after another exit attempt.

Using stop(true) in triggersExit results in a duplicate entry in the user's history will be created in the "next" slot. This is arguably a small price to pay for triggersExit firing again (on routing) after a stop.

Using stop(true) in triggersEnter results in a new entry in the user's history in the "next" slot for the route for which entry was stopped.
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.

1 participant