0

post request in the action creator?

Blog app : mongodb, express, react ,redux; i am working on a blog app and , and i am wondering if i it's ok to use action creators in react-rerux for crud operationa like post , in this case it doesn't return a payload .

20th Oct 2019, 6:19 AM
vikash surin
vikash surin - avatar
4 Réponses
+ 8
You can refer to this guide: https://redux.js.org/advanced/async-actions There is no problem using action creators for CRUD operations, even if there is no returned payload. You can (and should) invoke an action depending on the returned status from the server.
20th Oct 2019, 10:43 AM
Burey
Burey - avatar
+ 2
Gordon thanks for mention i have never used action creators😅 Maybe Burey can help
20th Oct 2019, 10:23 AM
Ashutosh Agrawal
Ashutosh Agrawal - avatar
20th Oct 2019, 6:48 AM
Gordon
Gordon - avatar
+ 1
Thanks for clearing my doubts .😊
20th Oct 2019, 1:57 PM
vikash surin
vikash surin - avatar