You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think you can make the hooks work like this in Hydrogen 1 since they are just React callbacks, but perhaps @lordofthecactus can give more information on this.
The cart is being reworked in Hydrogen 2 and I think it will be more flexible then.
As @frandiox mentioned, in Hydrogen v1 It is not possible at the moment to chain async calls with await. It is possible to do chaining by checking the useCart status and keeping track of which calls have been made.
Describe the bug
There must be the way to trigger multiple hooks async.. but there don't seems to be.
To Reproduce
await cartCreate({});
await linesAdd([...]);
await discountCodesUpdate({...});
...
Expected behaviour
Multiple hooks need to be triggered asynchronously.
The text was updated successfully, but these errors were encountered: