Skip to content

Multiple Counters on the Same Page 😮 #40

Closed
@nelsonic

Description

@nelsonic

It occurred to me while applying the Elm Architecture to my little "side project": dwyl/time-mvp-node#33
That there's a "gap" in this tutorial, namely: how do we have a more "complex" model
(all the examples in the tutorial, currently have model as an int)

I propose that we: write an "exercise for the reader" to:
a) refactor the model in the "reset counter" example to use an Object
e.g: var model = { counters:[0] }
where the value of the first element in the model.counters Array
is the value for the single counter example.
b) using the var model = { counters:[0] } approach, display multiple counters on the same page.
c) write tests for the scenario where there are multiple counters on the same page.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions