Evan pointed out on Elm Dev that this is functionality is already available:

none = text ""

but I don't think that solution is very obvious, and agree that adding none
to the library would be nice.

On Wed, Aug 31, 2016 at 4:02 PM, Mark Hamburg <mhamburg...@gmail.com> wrote:

> Html.none would produce a virtual DOM node but that node would not produce
> anything in the actual DOM. It's usage is an alternative to list
> concatenation and empty divs. For example:
>
> div []
>     [ headerView model,
>     , model.error |> Maybe.map errorBoxView |> Maybe.withDefault Html.none
>     , bodyView model
>     ]
>
> Now, when diffing the virtual DOM, the header, optional error box, and
> body are always at the same indices within the div but we haven't cluttered
> the real DOM with empty nodes.
>
> Mark
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Elm Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elm-discuss+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to