Closed kerams closed 5 years ago
Sounds good, but do you normally want to it have apply to all navigate
operations if you set it globally in router itself:
Router.router [
Router.mode.history // <-- this property?
Router.onUrlChanged (UrlChanged >> dispatch)
Router.application currentPage
]
or would you rather have a parameter on navigate:
Router.navigate("users", Router.modifyHistory) // <-- this?
// or
Router.navigate("users", Router.mode.history) // <-- maybe this?
The latter for sure. Then I'm not certain whether I'd like a parameter or a new method (with overloads) that does not modify history.
I've added it as an optional parameter as of v1.1.0
Router.navigate("users", HistoryMode.ReplaceState)
// etc.
Awesome, appreciate it.
In some cases you don't want to affect the history when chaning the URL, so it would be nice to have a parameter for this on Router.navigate