![Javascript to Elm artwork](https://is5-ssl.mzstatic.com/image/thumb/Podcasts123/v4/ae/06/b5/ae06b52b-64ae-9a7e-1f31-b293a2085da9/mza_3840978457865575010.png/100x100bb.jpg)
52: Gonna Make it
Javascript to Elm
English - September 25, 2018 18:42 - 19 minutes - 16.8 MB - ★★★★★ - 4 ratingsTechnology elm javascript programming Homepage Download Apple Podcasts Google Podcasts Overcast Castro Pocket Casts RSS feed
Previous Episode: 51: Elm Routing (Maybe)
Next Episode: 53: Elm Conf 2018
We are coming down to the wire to get the rest of our app from React to Elm. Router has been a huge hang up for us this last week. Might be through the tough parts. Let's find out.
Getting Through the routing
Elm wasn’t updating when the URL changed.
Probably bc we weren’t telling elm, only the react router. D’ohElm Navigation helper function newUrl and modifyUrl
newUrl takes a string and returns a Cmd only changes url currently on, does not all to the browser history, ? man, gotta learn a little more about browser API’s. So much of my time up til now has been reliant on the JS Framework to abstract those away. Not a bad thing, just never learned the core functionality that I was using. New Note and Existing note both launch to the right page!!! We are, in a funny way, right back where we started. Man we are in the deeps of Elm. This is fun.Getting note data by id
Outing going data with note id as part of the request Done lots of these We’ll need to request it when the URL matches the “note” rough Ah, where to make this request? Probably best in the update where we are getting the UrlChange ? yeah. We can pattern match on if it’s the ‘Note’ route and then call that cmd there ? cool. Then some incoming data to populate the view. Type trickery how do you take a type that takes a variable type of arguments collapse all those parameters Resources SPA Navigation Elm Navigation Docs Elm amazing router Elm Electron Build FollowJavaScript to Elm
Twitter: @jstoelmEmail: [email protected]
Jesse Tomchak
Twitter: @jtomchak