paldepind / functional-frontend-architecture

A functional frontend framework.
MIT License
1.44k stars 87 forks source link

Todomvc example: How to remove task if it becomes empty? #22

Open gnois opened 8 years ago

gnois commented 8 years ago

Hi @paldepind, thanks for these awesome examples. Newbie here trying to learn by doing.

I am trying to remove the task if it has become empty after editing, as seen in the screenshot below. I guess this requires pushing a Remove action into the Tasklist stream from the Task's ChangeTitle action. However, I do not know how to achieve this using union-type, flyd and ramda.

animation

Appreciate any guidance or even code examples. Thanks again.

gnois commented 8 years ago

Btw, when editing in the middle of the text, the caret will jump to the end of the text for each key press, seen below: animation2