Fork me on GitHub
#fulcro
<
2019-04-10
>
souenzzo14:04:37

I'm doing a chat app When I load new messages, i use df/append-to and df/prepend-to to load older/newer messages But in some race conditions, I get "duped" messages. How do I dedupe the idents?

tony.kay14:04:00

strange….js jhas one thread…what race?

tony.kay14:04:16

I think you’re sending dupes

souenzzo14:04:53

I'm doing this [{(new-message {:text "foo"}) [:message/id :message/text]}] < new message mutation, it use df/append-to [{(:message/messages-after {:id last-msg-id}) [:message/id :message/text]}] < there is a loop that load this every ~2s When both queued on client, it generates a duped message