rtfeldman / elm-spa-example

A Single Page Application written in Elm
https://dev.to/rtfeldman/tour-of-an-open-source-elm-spa
MIT License
3.29k stars 531 forks source link

elm/http 2.0 #76

Open chevinbrown opened 5 years ago

chevinbrown commented 5 years ago

I'm working with this architecture example & an existing project that is using elm/http 2.0...is there a straightforward path to upgrading that API?

I've been attempting, but continually getting stuck...will happily do the gruntwork if I can get an assist to get started. 😃

berenddeboer commented 5 years ago

It's easy, your functions simply return Cmd Msg, instead of a Request object.

chevinbrown commented 5 years ago

@berenddeboer, yes you're right...but that signature change carries across all callsites and I'm unsure of the best path forward to map Cmd Msg, which is what I'm really curious about. Maybe you can provide more insight for this particular change as it relates to this project?

jsmith-dev commented 5 years ago

@berenddeboer 'it's easy' - 3mo ago... anyone feel like posting a Gist / Ellie or a pull-request of what this update to http 2.0 might look like in practice?

nikolisgal commented 5 years ago

Well if you are not looking to completly migrate existing calls but rather use Http 2.0 in the project for your own different api calls while experimenting with the particular project there is allso the https://package.elm-lang.org/packages/NoRedInk/http-upgrade-shim/1.0.0/Http-Legacy which can make transition phase a peace of cake essentially allows you to have both versions on the project at the same time.

dwayne commented 6 months ago

@chevinbrown @jsmith-dev I have a completely new implementation that uses the latest elm/http among other things.