How to give react Asynchronous request to loading

The

ant-design table has loading effect, but before the request, you need to change loading to true,then and catch to false,
and perform 3 setState, renderings and 3 render functions. How to optimize

Mar.10,2022

does not need optimization. This is the case. Why do you need optimization? the state of loading has changed from true to false,. You must start rerender, to trigger the update of UI


without optimization. How to trigger the status of render


promise is either resolved or rejected, so it can only be rendered twice, which is unavoidable.

Menu