在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:elm/html开源软件地址:https://github.com/elm/html开源编程语言:Elm 100.0%开源软件介绍:HTMLQuickly render HTML in Elm. ExamplesThe HTML part of an Elm program looks something like this: import Html exposing (Html, button, div, text)
import Html.Events exposing (onClick)
type Msg = Increment | Decrement
view : Int -> Html Msg
view count =
div []
[ button [ onClick Decrement ] [ text "-" ]
, div [] [ text (String.fromInt count) ]
, button [ onClick Increment ] [ text "+" ]
] If you call <div>
<button>-</button>
<div>42</div>
<button>+</button>
</div> This snippet comes from a complete example. You can play with it online here and read how it works here. You can play with a bunch of other examples here. Learn MoreDefinitely read through guide.elm-lang.org to understand how this all works! The section on The Elm Architecture is particularly helpful. ImplementationThis library is backed by elm/virtual-dom which handles the dirty details of rendering DOM nodes quickly. You can read some blog posts about it here: |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论