You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I start with the caveat that for me, as a "non-programmer" just make your apps as simple as feasibly possible. Then handover to someone who knows what they're doing when you scale up!
Start with the simplest thing first, until you find that you need a custom type to convey useful information.
It's probably right to say that much of the time, regular Elm data types are just fine.
As soon as you see complexity and complection arise ... STOP! Simplify it.
You'll have missing sections in your data but just treat them as empty views.
Make sure to think through your data structures first. Only use a type Custom if it describes the problem better, or does something a simple data type can't.
There's nothing wrong with Maybe, just don't overuse it.
Simple rules to follow
optional
form fields. Don't bother toJson.Encode
themtype Custom
if it describes the problem better, or does something a simple data type can't.Maybe
, just don't overuse it.Id Int
fromOtherId Int
in your code.Entries Entry (List Entry)
could be better thanEntries (List Entry)
json
to replicate types can make life complicated.RemoteData
,nonempty
lists orList-Extra
The text was updated successfully, but these errors were encountered: