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

Fix multiple actions when using redux saga #137

Merged

Conversation

Norris1z
Copy link
Contributor

When using this library with redux saga, the action:
@@network-connectivity/CONNECTION_CHANGE seems to be fired even when the internetConnection state is the same as the previousState.

This pull request is related to issue #119

This pull request if merged will fire connection change action only when the current action is different from the previous action

Copy link
Owner

@rgommezz rgommezz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Norris1z, many thanks for the PR!

Looks good, just some nits to address before getting it merged.

Also, could you please remove package-lock.json? I use Yarn as the official Node package manager, so only yarn.lock files should be committed

src/sagas.js Outdated Show resolved Hide resolved
src/reactConnectionStore.js Outdated Show resolved Hide resolved
@Norris1z Norris1z force-pushed the fire_action_for_unique_connection_changes branch from 3962f82 to b1a638e Compare December 21, 2018 05:33
Copy link
Owner

@rgommezz rgommezz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looking good now 👍

@rgommezz rgommezz merged commit 01b9b96 into rgommezz:master Dec 21, 2018
Norris1z added a commit to Norris1z/react-native-offline that referenced this pull request Dec 24, 2018
When using this library with redux saga, the action:
`@@network-connectivity/CONNECTION_CHANGE` seems to be fired even when the `internetConnection` state is the same as the `previousState`.

This pull request fixes rgommezz#119 

This pull request if merged will fire connection change action only when the current action is different from the previous action
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.

None yet

2 participants