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
Hi. First of all, thanks for the effort that went into this. It's really a neatly done piece of code. Congrats!
Secondly, after using it for a little while, I seem to be starting to hit the limits of the api (maybe) and I was wondering if I am just doing something wrong, or if this is indeed not 100% suited for me.
My usecase:
I have to fire a request and then on success I have a to chain a few more requests after that. e.g. :
Create a resource.
On success an id is returned
Use this id to perform other requests
And here's where I struggle.
Firing action in reducer is obviously an anti pattern so I can't go that way.
Chaining of actions as described in readme would work (in my setup I don't get a promise for some reason so I am only speaking theoretically). The problem with this though is I can create this resource from many places . Chaining actions in UI seems therefore a bit too repetitive for comfort.
Am I missing something or would it make more sense for me to use pure axios with some defaults set?
Main reason why I went with this lib is ease of adding authorization and very neat config on the action side. Wouldn't want to lose that but I feel like I might have hit a limitation.
Thanks for your input!
The text was updated successfully, but these errors were encountered:
It was indeed my misunderstanding of the lib capabilities. The dispatch itself returns a promise, therefore it's easy enough to chain these inside the action creator. Check out my #68 for implementation details
Hi. First of all, thanks for the effort that went into this. It's really a neatly done piece of code. Congrats!
Secondly, after using it for a little while, I seem to be starting to hit the limits of the api (maybe) and I was wondering if I am just doing something wrong, or if this is indeed not 100% suited for me.
My usecase:
I have to fire a request and then on success I have a to chain a few more requests after that. e.g. :
And here's where I struggle.
Firing action in reducer is obviously an anti pattern so I can't go that way.
Chaining of actions as described in readme would work (in my setup I don't get a promise for some reason so I am only speaking theoretically). The problem with this though is I can create this resource from many places . Chaining actions in UI seems therefore a bit too repetitive for comfort.
Am I missing something or would it make more sense for me to use pure axios with some defaults set?
Main reason why I went with this lib is ease of adding authorization and very neat config on the action side. Wouldn't want to lose that but I feel like I might have hit a limitation.
Thanks for your input!
The text was updated successfully, but these errors were encountered: