Sometimes our update logic is asynchronous. In this lesson we will investigate two ways in which we can write asynchronous update logic.
…But, we will also discuss why asynchronous producers should be avoided, and how that can be done by better separating our logic.
This lesson also demonstrates the “createDraft” and “finishDraft” APIs
afaiu this is more like a sugar to avoid creating async wrapper around product(state, draft => {})
?
Sorry, I don't understand the question :) Could you elaborate?
I'm impressed how fast you are replying! Sorry, I haven't finished last 20 secs at the time writing the question. But you're actually sharing this point there: Such a library isn't supposed to support async recipes in the core. It's much better practice to have an async parent function, where data is fetched first and then passed to the synchronous version of product
function.