view : () -> Browser.Document Msg
view model =
let
list =
[ "foo" ]
t =
if list == list then
"list = list"
else
"list /= list"
in
{ title = "Hello"
, body =
[ div [] [ lazy2 lazyView "1" list ]
, div [] [ lazy2 lazyView "2" list ]
, div [] [ lazy2 lazyView "3" list ]
, div [] [ text t ]
]
}
lazyView : String -> List String -> Html Msg
lazyView val =
input [ value (Debug.log "input render" val), onInput (\ -> NoOp) ] []
SSCCE
import Browser import Html exposing (Html, div, input, text) import Html.Attributes exposing (value) import Html.Events exposing (onInput) import Html.Lazy exposing (lazy2)
type Msg = NoOp
main : Program () () Msg main = Browser.document { init = _ -> ( (), Cmd.none ) , view = view , update = _ -> ( (), Cmd.none ) , subscriptions = \ -> Sub.none }
view : () -> Browser.Document Msg view model = let list = [ "foo" ]
lazyView : String -> List String -> Html Msg lazyView val = input [ value (Debug.log "input render" val), onInput (\ -> NoOp) ] []