Closed cmeeren closed 4 years ago
Hi @cmeeren, I see the problem but I am not sure from first glance why it happens 😓 I can try to investigate it soon from your docs app
I think I found the problem in this line
As of recent versions of Feliz.Router, you should provide the initial route in your init
function like this:
let init () = {
CurrentPath = Router.currentUrl()
CustomThemeMode = None
}
This is because the onUrlChanged
no longer trigger when the router component is mounted on application startup. Instead, the event is only triggered when the url actually changes after the router is mounted.
Excellent, thanks! Works now, published updated docs.
I noticed that this page has a link to https://cmeeren.github.io/Feliz.MaterialUI/#ecosystem, but the latter page only shows the root. (You can't even click "Ecosystem" in the menu - you have to navigate to another page, and then back to Ecosystem.)
Here is the code that runs the page. Seems correct to me. So is this a bug in Feliz.Router?