Devs.tw 是讓工程師寫筆記、網誌的平台。歡迎您隨手紀錄、寫作,方便日後搜尋!
https://guide.elm-lang.org/webapps/structure.html
I encourage you to push your limit on number of lines! See how far you can go. Try using comment headers, try making helper functions, but keep it all in one file. Having this experience yourself is extremely valuable!
Some folks see The Elm Architecture and have the intuition to divide their code into separate modules for Model, Update, and View. Do not do this!
It leads to unclear and debatable boundaries.
If you build each module around a type, you rarely run into these kinds of questions.
Actively trying to make components is a recipe for disaster in Elm.