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
It seems that the router is called twice after refreshing (F5) a page on chromium-based browsers (reproduced with chromium, chrome and brave on linux, but behaves as expected with Firefox).
It implies a duplication of the messages and commands that may be produced by the update function that handles the message from the router.
Adding a println allows to highlight the behavior.
val routes: Location => Msg = {
case loc: Location.Internal =>
println(s"Router Internal Location: $loc")
loc.hash.getOrElse("#/").drop(1) match
case "/" => Msg.NavigateTo(Page.Home)
case _ => Msg.NoOp
case loc: Location.External =>
println(s"Router Location External: $loc")
}
The text was updated successfully, but these errors were encountered:
Hi,
It seems that the router is called twice after refreshing (F5) a page on chromium-based browsers (reproduced with chromium, chrome and brave on linux, but behaves as expected with Firefox).
It implies a duplication of the messages and commands that may be produced by the update function that handles the message from the router.
Adding a
println
allows to highlight the behavior.The text was updated successfully, but these errors were encountered: