I have 2 comonents: A and B, each one has onLoad method. B will be used by A.
There is a ref named ‘key’ in A which is valued in A.onLoad, then passed to B as a parameter. In onLoad method of B, key is used to get data from server, but B.onLoad is executed before A.onLoad, so the key is undefined.
My problem is: How to ensure that the key is initialized correctly by A before it is used in B.onload.
2