look at the title, I guess you don"t understand, ha, I don"t understand either?
Let me describe it in detail
this is the case. I intend to store a data in redux. This data will be used in some sub-component of the application. The default value needs to be loaded from the server-side api. The key point is that this sub-component is hidden by default.
so. My understanding is:
Application loading does not need to load this data, and when this subcomponent is displayed, the data is loaded asynchronously. So, the problem is, after loading, the subcomponent is unloaded again, and then it is displayed again, so there is no need to load the data asynchronously again, but how do I know that this is not the first time it has been loaded? Do you judge according to the data of state? no, it violates the principle of ui=f (data).