DEV Community


Discussion on: Lessons learned from my first 10k LOC in Elm

herteby profile image
Simon Herteby

Two tips for the Select wrapper:

  • Since only one option can be selected at a time, you can model that by having a selected: Maybe option argument for the whole Select, instead of setting it per option.
  • With some tricks you can make Selects work with any type, not just Strings!

Here's a demo :)

rametta profile image
Jason Author

That's great, thank you Simon!