I haven’t posted the code, so I will talk about my theoretical understanding. My idea is, don’t you want to prevent the loading event of the sub-component, and isn’t this behavior very strange? You should make the render of your sub-component only style out when render is used, but the request inside should be triggered only when user interaction occurs. It should be bound to render when onclick is used, etc. In terms of interactive behavior, requests should not be made directly during render.
I haven’t posted the code, so I will talk about my theoretical understanding. My idea is, don’t you want to prevent the loading event of the sub-component, and isn’t this behavior very strange? You should make the
render
of your sub-component only style out whenrender
is used, but the request inside should be triggered only when user interaction occurs. It should be bound torender
whenonclick
is used, etc. In terms of interactive behavior, requests should not be made directly duringrender
.