react is usually placed in the lifecycle componentDidMount event, but now I have a requirement to send two requests, and the parameter of the second request is the result of the first request.
for example, the result of the first request: state.res1 if I put all the requests directly in the componentDidMount, the second request will not get parameters at first.
what I"m doing now is that the first request updates a boolean:state.res1IsCompleted logo in addition to updating the state.res1, puts the second request in the componentDidUpdate, and then determines whether or not to initiate the second request based on the res1IsCompleted logo.
but it"s a little weird that if my request relies too much (because I"m working on a workflow-related page, there will be a lot of design requests), there will be a bunch of identity status in state.