Created
April 28, 2016 13:21
-
-
Save gdotdesign/6b79605e7f4e495e19f77930f61103e1 to your computer and use it in GitHub Desktop.
Elm 0.17 - Lazy error
This file contains 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
149lazy_test.elm:6939 Uncaught Error: Ran into an unknown patch! | |
applyPatch @ lazy_test.elm:6939 | |
applyPatches @ lazy_test.elm:6889 | |
updateIfNeeded @ lazy_test.elm:6277 |
This file contains 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
Also run into this error with lazy, couldn't reproduce it just yet. | |
Uncaught TypeError: Cannot read property 'index' of undefined | |
addDomNodesHelp @ main.js:7314 | |
addDomNodes @ main.js:7306 | |
addDomNodesHelp @ main.js:7322 | |
addDomNodesHelp @ main.js:7353 | |
addDomNodesHelp @ main.js:7353 | |
addDomNodesHelp @ main.js:7353 | |
addDomNodesHelp @ main.js:7353 | |
addDomNodesHelp @ main.js:7353 | |
addDomNodesHelp @ main.js:7353 | |
addDomNodes @ main.js:7306 | |
applyPatches @ main.js:7381 | |
updateIfNeeded @ main.js:6775 |
This file contains 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
import Html exposing (node, div, text) | |
import Html.App | |
import Html.Lazy | |
import Time | |
type Msg | |
= UpdateTime Float | |
type alias Model = | |
{ time : Float } | |
update : Msg -> Model -> (Model, Cmd Msg) | |
update msg model = | |
case msg of | |
UpdateTime time -> | |
({ model | time = time }, Cmd.none) | |
view : Model -> Html.Html Msg | |
view model = | |
node "test" [] [text (toString model.time)] | |
main = | |
Html.App.program | |
{ init = ({ time = 0}, Cmd.none) | |
, update = update | |
, view = Html.Lazy.lazy view | |
, subscriptions = \_ -> Time.every 100 UpdateTime | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment