I am writing to ReactJS. In the interface there are charts that are generated dynamically. The procedure is as follows: the user selects an item in the drop-down; by clicking on the item, a request is made for api to get an object with data for the charts. At the same time, in the reducer, until the data has arrived, I set the flag isLoading: true. When the data comes in change to false. On this field, I expose spinner. However, the gap is that there is a lot of data and after they arrive, before the rendering of the charts, some more time passes and it does not look very nice. Is it possible to somehow handle this situation and show another spinner as an example until the array of charts has formed?

  • and it is impossible to change isLoading in componentDidMount? - Yuri Kopot
  • What if you create another action, which after the arrival of the data will render them in the display: none block, with an artificial delay, after the passage of which isLoading becomes false, and display - block? - DiDex
  • @YuriKopot so isLoading in props and changes redux - Iga

0