Created
January 19, 2020 07:38
-
-
Save maxfarseer/52e0eea4189e6d2f65ae9234c5fdcbda to your computer and use it in GitHub Desktop.
Narrowing-types_scaling_elm_apps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- было | |
viewHeader : Model -> Html Msg | |
viewHeader model = | |
...127 lines | |
viewBody : Model -> Html Msg | |
viewBody model = | |
...349 lines | |
viewFooter : Model -> Html Msg | |
...238 lines | |
-- стало | |
-- сузили: viewHeader теперь ждет только инфу об юзере и уведомлениях | |
viewHeader : User -> Int -> Html Msg | |
viewHeader user notifications = | |
...127 lines | |
-- viewBody все же ждет "всю модель", не сузить | |
viewBody : Model -> Html Msg | |
viewBody model = | |
...349 lines | |
-- viewFooter просто возвращает верстку, не ждет аргументов | |
viewFooter : Html Msg | |
...238 lines |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment