We avoid starting and do a bunch of other things to make us feel productive, like cleaning out our bash_profile, or making new Dockerfiles. Eventually we buckle down and get started on the last part of pulling React out of our project.
Things I did before I got started
bc it’s the biggest. I feel like if we get to the top of this hill, and quickly, it’s all downhill from here. Meaning the momentum should allow us to plow through login and signup
bring over needed Elm pieces to react container
create route ‘Note’ save
create case for Note on view based on route
AH DAMN IT now i need the note id from the url
url parser ?
elm package install evancz/url-parser
route : Url.Parser (Route -> a) a
the type ‘a’ of ‘a’ throws me off. Url.Parser is a type that take an argument, a function that takes Route and return something, and the product of that function Url.Parser and Route -> a takes another of type a.
NOPE Url.Parser takes as an argument a function that itself takes a type Route and returns a type of ‘a’, with that function Ulr.Parser will return an ‘a’ ?
parse to the root of my app ?
Module build failed: Error: Compiler process exited with error Compilation failed ==================================== ERRORS ==================================== -- TYPE MISMATCH ------- /c/Users/jtomc/Documents/Elm/elm-notes/src/elm/Main.elm The definition of `routeParser` does not match its type annotation. 79| routeParser : Url.Parser (Route -> a) a 80| routeParser = 81|> oneOf 82|> [ map Home Url.top 83|> , map NewNote (s "notes" </> s "new") 84|> , map Note (s "notes" </> Url.int) 85|> ] The type annotation for `routeParser` says it is a: Parser (? -> a) a But the definition (shown above) is a: Decoder value
rad the example is exactly backwards of what I want to do url-parse example