What is the problem with redux-saga call calling methods?

problem description

I have taken a look at redux-saga in the last two days. I have a question that is not very clear. Let me ask you something:

clipboard.png
authorizetoken:

clipboard.png

The

Api.authorize function I use axios to return data, but since it is neither a generator function nor a Promise object, the put method that follows does not wait for the token value and executes immediately. This result is obviously not in line with expectations, I would like to ask, in the actual development, how to ensure that the put method will be implemented after getting the token value?

Apr.13,2022
Menu