Merge pull request #630 from NoRedInk/lazy

speed up examples with laziness
This commit is contained in:
Brian Hicks 2020-10-16 12:09:23 -05:00 committed by GitHub
commit c1140b6d4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,7 @@ import Css exposing (..)
import Css.Global exposing (a, descendants)
import Html.Styled as Html exposing (Html)
import Html.Styled.Attributes as Attributes
import Html.Styled.Lazy as Lazy
import KeyboardSupport exposing (KeyboardSupport)
import Nri.Ui.Colors.V1 exposing (..)
import Nri.Ui.Fonts.V1 as Fonts
@ -84,7 +85,12 @@ wrapState wrapState_ unwrapState example =
view : Example state msg -> Html msg
view example =
view =
Lazy.lazy view_
view_ : Example state msg -> Html msg
view_ example =
let
fullName =
"Nri.Ui." ++ example.name ++ ".V" ++ String.fromInt example.version