How to make a subcomponent not load during initialization?

  node.js, question

图片描述
As shown in the figure, I have a page with a table in it, and table inside has a Modal, in which the data of table inside is directly obtained by request when the page is opened for initialization. when I click on the modal of “assign experts”, table will pass the id of this column to modal, and modal will then obtain the data (incoming id) by request, but I will directly execute two requests as soon as I open the page.
图片描述
Instead of executing the table request first, then I clicked the modal button before executing the next one.
What is my problem? (ps. Looks like react inside has an event that can prevent sub-components from loading, similar to didComponent)

Without posting the code, I will talk about the theoretical understanding. My idea is that you are not going to prevent sub-component loading events, and this behavior is not very strange? You should have let your sub-componentsrenderWhen, onlyrenderA style, but the request should be triggered only when user interaction occurs, should be inrenderWhen binding inonclickSuch as interactive behavior, should not be inrenderWhen you go directly to request.