has been plagued by a problem, that is, the value saved by this redux,
.for example, a data structure is obtained through api, but before the fetch comes down, the page will be rendered once. At this time, the data structure does not exist in redux, so there is a undefined problem
.it is also said that an initial value should be given in redux. How should this initial value be given? I can"t make a copy of the server"s data structure and put it in redux as the initial value, can I? There are a lot of data structures that need to be obtained through the server, so don"t you have to copy them all?
then I try to create an identity in redux, that is, when the data structure is not yet available, when the data structure has been obtained for false, change it to the state of true, and then render render to check whether the logo is true or false, but there is another problem. There are many pages, so don"t all pages have to add such a check,
ask my friends for advice. Thank you very much for your advice.