Open tysonzero opened 7 years ago
Check out http://blog.wuzzeb.org/full-stack-web-haskell/client.html (search for routing).
I haven't done that yet, and it could certainly be mentioned in the documentation somewhere. Do you have a suggestion where you would have found it before opening this issue? Then we could add it there.
I just CTRL+F'd "url" through the source code of the modules I thought might have it lol. So I guess just whatever module seems best to you, or a new module if none of them fit.
And then perhaps adding to an example in react-hs-examples
yes, that would be great! ideally, it would be a copy of the example we have, even if it only differs in this one aspect. it's nice to have a basic example where new users don't have to filter out too much code they are not interested in yet.
Yeah I think an example that includes basic state manipulation, URLs, localStorage, forms / error handling and ajax requests would be perfect. As it seems to me as though most websites will probably involve all of the above.
Specifically I want to be able to read in the URL (particularly on initial page load) and do actions depending on its value. I also want to be able to write to the URL (like pushState style, where the back button works properly). And I want to be able to listen for the pushState event, that way I can do the right thing whenever a link is pressed, I guess this is (probably?) not strictly necessary if I have the other two things though.