0

In my current code base actions are dispatched from a few stateful components or separated "services" that listen for user or both sensor and real world events. This is a react-native application built with redux.

The rest of the code is normally stateless component that represent the state of the app, as recommended. However I have not yet used the Redux Async Actions proposal from https://redux.js.org, which I normally follow.

Even though I know it is best practice to keep as many components as stateless as possible, Async Actions and using middleware seems to overcomplicate a relatively simple task, like login an user from input.

Is it worth it? Is there any other reason why I should use an async actions flow?

jsdario
  • 6,477
  • 7
  • 41
  • 75
  • how do you intend to do the login otherwise? Requests are async? I don't think it's possible to get away without async, so I'd invest the time to understand how that works - it's a bit frustrating at first, but not that complicated. – Lyubomir Sep 21 '16 at 07:47
  • With a stateful component you can handle pretty much all the steps and on fulfillment emit an `rememberUser` action – jsdario Sep 21 '16 at 07:51
  • sorry, ignore my first comment - the question is really good and the creator of redux has already given an answer to that – Lyubomir Sep 21 '16 at 08:05
  • Thanks @leo, could not find it before – jsdario Sep 21 '16 at 08:28

0 Answers0