A task queue's input queue is processed as soon as we put something into it. That behavior is correct.
As soon as processing starts, the items get popped from it. That is also correct.
Therefore it may seem like it's redundant, but it is not! It serves the purpose of when in a react application a lot of things happen, during, between, before, or after a render for example, things may hang around.
This is why we use the dispatch set action approaches instead of simple setters.
Now, all that said, we should somehow create UAT tests for such cases. I didn't have any ideas yet, but most likely it's trivial.
A task queue's input queue is processed as soon as we put something into it. That behavior is correct.
As soon as processing starts, the items get popped from it. That is also correct.
Therefore it may seem like it's redundant, but it is not! It serves the purpose of when in a react application a lot of things happen, during, between, before, or after a render for example, things may hang around.
This is why we use the dispatch set action approaches instead of simple setters.
Now, all that said, we should somehow create UAT tests for such cases. I didn't have any ideas yet, but most likely it's trivial.