Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some responsibilities from action #17

Open
renancarvalho opened this issue Apr 6, 2016 · 2 comments
Open

Remove some responsibilities from action #17

renancarvalho opened this issue Apr 6, 2016 · 2 comments

Comments

@renancarvalho
Copy link

renancarvalho commented Apr 6, 2016

Hi :)

I think that would be really nice if keep the handling errors in the component itself and remove it from the actions https://github.com/mxstbr/login-flow/blob/master/js/actions/AppActions.js#L195

I'm working on a PR for that, and what I'd like to propose is something like:

  • Dispatch and action like 'invalid_login' or something. ( I'll think a better name )
  • Subscribe to reducer and update the component based on the reducer state(in this case 'invalid_login')

The main idea is remove the DOM manipulation from the action.

Does it make sense?

@renatorib
Copy link

renatorib commented Jul 4, 2016

Surely it makes sense.
Actions must not receive any logic.

+1

@kopax
Copy link

kopax commented Oct 17, 2016

@renancarvalho +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants