I'm writing a function that displays error messages, so in my view, I have something like
div [] [ displayErrors model ]
in the event that there are no errors, how can I make displayErrors return something that is interpreted as an empty Html node?
You can also just call node. replaceChildren() and it will empty the node. It's quick, clean, and makes your intention clear.
The lower case msg is called a type variable. The upper case Msg is called a concrete type - its something your application has defined.
You can use an Html.text
node with an empty string:
emptyNode = Html.text ""
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With