There are three elements in my app: A, B and C. Callback 1 takes A and update B, while Callback 2 takes A and B and then update C. When A is changed, I want Callback 1 to be called first. And only after B is updated (and the default value is changed), Callback 2 is called to update C. What happens now is that, when A is changed, Callback 1 and 2 are fired at the same time, and Callback 2 is using the old value of B. I tried to set B as a State instead of an Input in Callback 2, this solves the previous issue that B is stale. But the problem of this is when A is changed, C is no longer updated.
Is there any way to solve this? Thanks in advance.