Skip to content

Expose action to listener #1795

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

Conversation

sandrinodimattia
Copy link

Today if you want to know if something changed you have to compare your previous state to the new state and in that case you might need to compare different values with one another.

With this PR we now also expose the action to the listener, making it easier to do something when an action was executed.

store.subscribe((action) => {
  if (action.type === 'SOMETHING') {
     // do something else
  }
});

@TrySound
Copy link
Contributor

TrySound commented Jun 8, 2016

@sandrinodimattia Was discussed tons of times. #1697

@sandrinodimattia
Copy link
Author

Whoops, thanks for pointing that out @TrySound ☺️

Closing...

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

Successfully merging this pull request may close these issues.

2 participants