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

Expand on how to replace start-app #2

Closed amitaibu closed 8 years ago

amitaibu commented 8 years ago

@rgrempel thanks a lot for this module!

I think a simple example that wires everything in, and for example allows navigating between some Counter.elm and CounterPair.elm pages will go a long way with understanding how all the wiring should be done, and how it will replace the typical start-app

rgrempel commented 8 years ago

Ah, that's a good idea -- I should do an example based on the elm-architecture-tutorial that allows navigation from one "page" to another. Either that, or I should do a version of the TodoListMVC.

I'd refer people to my csrs-elm, but it's not really a simple enough example, especially since I'm doing some funky stuff with modules there.

amitaibu commented 8 years ago

I'd go with a simple pages (e.g. the counter examples), as it won't distract people from the actual router implementation. The TodoMVC might be nice as a second more advanced example.

rgrempel commented 8 years ago

So, I've got some example code checked in now:

https://github.com/rgrempel/elm-route-hash/tree/master/examples/elm-architecture-tutorial

Note that this includes an example of the changes you need to make to StartApp if you're using start-app -- see:

https://github.com/rgrempel/elm-route-hash/commit/77228f25de1e05f419839ed9f63a51e046f84493#diff-0017ac34b434e83f80d5140dc35b727c