hmmm, my understanding is that the transaction are initiated by a
setState , and state changes of nested
setState that are called within life-cycle hooks can be merged this way so the diff will be performed once.
Please refer to
Hi forest, if I still remember it correctly…
Your understanding is correct. Consecutive calling of
setState one after another initiate multiple transactions and perform the “expensive” diff algorithm multiple times, hence I would not say it is a good programming practice as far as that is concerned.
Yes, it is self-created. But I cannot share you with the code as it is not meant to be open-sourced ATM. It is a very achievable goal. So if the UX is very much needed, the component could be created fairly fast. Feel free to post any questions here and I might be able to help.