Thanks, Peter. You got there ahead of me (thereby saving me from writing an example).
> Jun 14, 2016, at 8:47 AM, Peter Damoc <[email protected]> wrote: > > Here is a version of the CounterList with Context. It mimics how the old > Address context used to work. > > https://github.com/pdamoc/elm-architecture-tutorial/tree/master/examples/4b > > The main idea behind this approach is that the resulting view needs to talk > in the language of the parent so, each Context will have a `toParent` mapper > that takes the Child message and maps it to parent's AND a series of > parentMgs. In this case we have context.remove > The parent then creates the appropriate context for each child. > > > >> On Tue, Jun 14, 2016 at 4:48 PM, Adam Waselnuk <[email protected]> >> wrote: >> Mark would you be able to provide a link to that solution you are talking >> about here? >> >>> On Wednesday, May 18, 2016 at 4:40:07 PM UTC-4, Mark Hamburg wrote: >>> I'm hoping that's not how it is expected to work because it means that a >>> view layout decision — we need to put the remove button in with the counter >>> display and buttons — now spreads to the messages and update function. I >>> much prefer the solution that someone else posted where viewWithRemove >>> takes a context that provides a mapping for the counter messages and a >>> message to send on remove. That reflects the fact that it's the view change >>> that forces the programmer to say "okay, I can build that view but you need >>> to give me more context to do so successfully." >>> >>> Mark >>> >>>> On May 17, 2016, at 10:54 PM, Peter Damoc <[email protected]> wrote: >>>> >>>> It works like you can see in the second link you've quoted. :) >>>> >>>> >>>> >>>> >>>> On Wed, May 18, 2016 at 8:40 AM, Homan Chou <[email protected]> wrote: >>>>>> Hi Brian, >>>>>> The Elm Architecture Tutorial has a "nesting" example: >>>>>> https://github.com/evancz/elm-architecture-tutorial/tree/master/nesting >>>>>> >>>>>> If you worked with the previous elm-architecture-tutorial (the one with >>>>>> 8 examples) I have a port of that tutorial that you can consult to see >>>>>> how some of those concepts translate to 0.17: >>>>>> https://github.com/pdamoc/elm-architecture-tutorial/tree/master/examples/4 >>>>> >>>>> The new updated nesting tutorials don't include the modified "fancier" >>>>> list of counters example where the delete button is in the child Counter >>>>> component. In the 0.16 example a "context" was passed in from the parent >>>>> with some signal forwarding magic. In a world where there are no signals >>>>> in Elm now, how does this work? >>>>> -- >>>>> You received this message because you are subscribed to the Google Groups >>>>> "Elm Discuss" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send an >>>>> email to [email protected]. >>>>> For more options, visit https://groups.google.com/d/optout. >>>> >>>> >>>> >>>> -- >>>> There is NO FATE, we are the creators. >>>> blog: http://damoc.ro/ >>>> -- >>>> You received this message because you are subscribed to the Google Groups >>>> "Elm Discuss" group. >>>> To unsubscribe from this group and stop receiving emails from it, send an >>>> email to [email protected]. >>>> For more options, visit https://groups.google.com/d/optout. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Elm Discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/d/optout. > > > > -- > There is NO FATE, we are the creators. > blog: http://damoc.ro/ > -- > You received this message because you are subscribed to the Google Groups > "Elm Discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
