Closed jonsa closed 4 years ago
I don't think that's an option--SPA needs access to URL among other things, which isn't available in Browser.element
.
Actually it is possible, you just have to wire it up yourself as mentioned in Navigation in elements
I even managed to get a proof of concept working with state splitting across pages in this Ellie.
Anyway, I'm closing this issue since I got it working and I'll be able to extract any bits and pieces I might require.
Right...I don't really consider using ports to be the same thing. 😄
Any chance this can be rewritten using
Browser.element
instead ofBrowser.application
?I'm starting my journey into the realm of Elm and I was hoping to use this as a reference but I didn't have to dig deep in my background check to find some issues with a core concept used in this repo.
Browser.application
is, as far as I can tell, a naive implementation that doesn't work out in the wild. Due to it taking direct control of the body tag it doesn't play along well with some extensions (1) (2). And the sole purpose if this repo is to demonstrate how you would go about building a "real" elm app.[1] Discussion on discourse [2] https://github.com/elm/browser/issues/66