Is there any elm router that works for version 0.17?
There are several of them that are not compatible with the latest release.
Thank you very much!
Apparently a router is not needed any more, according to https://github.com/etaque/elm-routing-example
Do we need routers?
I don't think so anymore, at least since Elm 0.17 and port modules, and I say that as the author of elm-transit-router, one of the three main routers for Elm 0.16.
We need packages for route parsing: that is, a way to transform the string representation of the path or hash to our app internal model. There are a few packages for this already: Bogdanp/elm-route and etaque/elm-route-parser (disclaimer: I'm the author). sporto/hop also has parsing tools but it isn't yet migrated to 0.17.
For the rest, Elm is already efficient at the job, it's just a few Msg away!
In this example I added a fancy transition effect to illustrate my point: if you implement routing by yourself, you gain more power for specific behaviours.
Note: browser history handling is done with ports for now, but it will be >easy to upgrade when the Elm bindings will be ready.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With