fjvallarino/monomer

Problems with disposing a widget

Closed this issue · 2 comments

Scenario:

I have a widget defined like this:

homeWidget
  :: (WidgetModel sp, WidgetEvent ep)
  => TChan Request
  -> MVar RelayPool
  -> ALens' sp HomeModel
  -> WidgetNode sp ep
homeWidget channel pool model = composite_ "HomeWidget" model buildUI (handleHomeEvent channel pool) [ onInit Initialize, onDispose NoOp ]

handleHomeEvent 's NoOp handler is defined like this (for testing): NoOp -> []

My console shows me this error: ("Failed match on Composite handleMessage",HomeEvent)

Not sure what I am doing wrong here.

I just pushed a branch with a potential fix. The required updates to stack.yaml are:

- git: https://github.com/fjvallarino/monomer.git
  commit: 88c9766f04b94fee9dc7017e7b7129a30cedc1e3

This fixes it, thank you very much.