I'm quite new to FRP and bacon.js, so I might be doing something quite stupid.
The test app has a textarea and a submit button; the submit button adds values to a list and I show the list with React every time there is a change. Here's a gist with the code: https://gist.github.com/svileng/1f3702df855b50ed2f5e
The bug I'm trying to fix is that I can click the submit button many times, and the last value from the textarea keeps getting added to the list. The problem (I guess) is that in line 18, I'm clearing the value of the textarea manually. So the event stream newCommentValueS
and property newComment
are not updated, and the last value hangs around.
How can I fix that or go around the problem? Thanks!