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
I have a handleHistory function to help with routing.
It is used in particular to handle logging out, in which case the destination (To route) points to the route of the login page ; and also the 'Back' function.
handleHistory : DirectionMsg -> MyHistory -> MyHistory
handleHistory (To route) history =
history |> push (Router.pageWithDefaultTransition route)
Symptom
The log out action triggers an infinite list of StandardHistoryMsg (Tick Int) or lands in another page.
The following change to handleHistory (from pageWithDefaultTransition to pageWithoutTransition) make the application behave correctly.
handleHistory : DirectionMsg -> MyHistory -> MyHistory
handleHistory (To route) history =
history |> push (Router.pageWithoutTransition route)
No other change occurred between op / not op, and the symptom is reproductible.
Hints
Router.push has a case switch relative to this (isRunning transition). Router.push updates a transition field of a History value.
The text was updated successfully, but these errors were encountered:
Could you do an SSCCE? Without it, it's really complicated to understand what could bug. Or at least, could you show your flow in order to understand what's happening earlier and after transition.
Context
I have a handleHistory function to help with routing.
It is used in particular to handle logging out, in which case the destination (To route) points to the route of the login page ; and also the 'Back' function.
Symptom
The log out action triggers an infinite list of StandardHistoryMsg (Tick Int) or lands in another page.
The following change to
handleHistory
(frompageWithDefaultTransition
topageWithoutTransition
) make the application behave correctly.No other change occurred between op / not op, and the symptom is reproductible.
Hints
Router.push
has acase
switch relative to this (isRunning transition).Router.push
updates atransition
field of aHistory
value.The text was updated successfully, but these errors were encountered: