Elm:是否有适用于 0.17 版本的 url 路由器?

Elm: Is there any url router that works for version 0.17?

是否有适用于版本 0.17 的 elm 路由器?

其中有几个与最新版本不兼容。

非常感谢!

根据 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.