rgrempel / elm-route-url

Router for single-page-apps in Elm
http://package.elm-lang.org/packages/rgrempel/elm-route-url/latest
MIT License
196 stars 16 forks source link

Initial History state replace #23

Closed mblarsen closed 7 years ago

mblarsen commented 7 years ago

In the example test you write:

Note that reloading and bookmarking doesn't work with the "full URL" example, because that requires server-side support that I haven't implemented for the example. (That is, you'd have to adopt a scheme for the full URLs so that the server knows what actual page to send).

Since the example is for a SPA perhaps you should mention that you can have the same page return for all URL.

Anyway, I did exactly that, but I'm not seeing the initial state replace. Suppose you reload the page on /dog/humans. Then the generic SPA backend is served and then the Elm needs an initial kick so that location2messages is called.

It I'm not missing something, how do you usually go about this?

mblarsen commented 7 years ago

My apologies. I wasn't handling the update correctly.