Subscribe now

Elm Weekly Drip #14 and Exercise: Marking Active Routes [07.07.2016]

Monads

Time to click a bunch of links. This week: we'll cover more Phoenix and Elm; see another Elm game; learn a bit about building Effect Managers; learn how to enquire about DOM properties; see how to generate boilerplate; compare react/redux/elm; and hopefully contribute to a Mailing List thread that I find fascinating.

Exercise

For this week's exercise, add some CSS and mark links active based on the current route

  • If you're at /, the Home link should be active.
  • If you're at /topics, the Topics link should be active.
  • If you're at /topics/elm, the Topics link should be active.

You could also take this time to duplicate the Topic.view function (which shows those topic links) inside the navigation section when /topics* is the route, which would make sub-page navigation within the section simpler.

The monad burrito gif came from Brian Hicks in #general in response to a discussion about appropriate slackbot responses to the term 'monad'.