Closed bytesource closed 3 years ago
Hi Zaid,
In the section Modelling nested routes >> Passing URLs to child programs there is a value state that I'm not sure where it came from:
state
// App.fs let init() = let currentUrl = parseUrl(Router.currentUrl()) match currentUrl with | Url.User userUrl -> let (userState, userCmd) = User.init userUrl { state with CurrentUrl = currentUrl CurrentPage = Page.User userState }, Cmd.map UserMsg userCmd // ...
Peeking at the next chapter I saw that you initialized a defaultState inside init(), is this what you are doing here?
defaultState
init()
Should be fixed now, thanks for pointing it out and sorry it took so long!
There was no defaultState, here we are just constructing the state with only two fields: CurrentUrl and CurrentPage
CurrentUrl
CurrentPage
Hi Zaid,
In the section Modelling nested routes >> Passing URLs to child programs there is a value
state
that I'm not sure where it came from:Peeking at the next chapter I saw that you initialized a
defaultState
insideinit()
, is this what you are doing here?